hx509: keep track of authorized CSR features
This commit adds a few functions for marking KU, EKUs, and SANs as authorized, and for getting a count of unsupported certificate extensions requested, and a count of authorized KU/EKUs/SANs. The intent is to make it easier to build CSR authorization and CA code that is robust in the face of future support for certificate extensions and SAN types not currently supported. An application could parse a CSR, iterate all KU/EKUs/SANs, check a subject's authorization to them, mark them authorized where authorized, then check if there are any remaining unauthorized extensions or unsupported extensions requested. Ultimately, if a CSR's KU/EKUs/SANs are all authorized, then they can all be copied to a TBS, and a certificate can be issued.
This commit is contained in:
@@ -36,6 +36,7 @@ error_code NAME_MALFORMED, "Name is malformed"
|
||||
error_code CERTIFICATE_MALFORMED, "Certificate is malformed"
|
||||
error_code CERTIFICATE_MISSING_EKU, "Certificate is missing a required EKU"
|
||||
error_code PROXY_CERTIFICATE_NOT_CANONICALIZED, "Proxy certificate not canonicalized"
|
||||
error_code NO_ITEM, "No such item / iteration end"
|
||||
|
||||
# cms related errors
|
||||
index 32
|
||||
|
Reference in New Issue
Block a user