openssl: Generated X.509 certs should be RFC 5280 compliant by default
Meanwhile we have stronger checks for X.509 certificates to comply to RFC 5280,
at least when strict checking is enabled (e.g., using -x509_strict).
Yet unfortunately the OpenSSL apps by default tend to generate certs that are not compliant. In particular, X.509v3 certs (i.e., those having any X.509 extensions) MUST include
- an authority key identifier (AKID) with the exception of self-signed certs - see https://tools.ietf.org/html/rfc5280#section-4.2.1.1
- a subject key identifier (SKID) with the exception of non-CA certs - see https://tools.ietf.org/html/rfc5280#section-4.2.1.2
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (14 by maintainers)
Commits related to this issue
- apps/{req,x509,ca}.c Make sure certs have SKID and AKID X.509 extensions by default Fixes #13603 — committed to siemens/openssl by DDvO 4 years ago
- Update to upstream master (#273) * Update copyright years of auto-generated headers (make update) Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/o... — committed to open-quantum-safe/openssl by baentsch 3 years ago
This brings me to a refinement of my plan:
Make the following X.509 extension configuration options the default:
and provide for both of them the possibility to provide instead the value
nofor disabling (default) generation, i.e.,Regarding non-CA certs, the subject key identifier (SKID) is still listed as a SHOULD in RFC 5280:
So, while not mandatory, we might want OpenSSL apps generating end-entity certs to include a SKID by default (along with an AKID if they are not self-signed).
I like your refinement; thanks @ddvo.
Your plan makes sense. But I think you should add a config option to make it not happen. A common use of openssl is to generate test certs.
This is something that would be nice to get fixed for 3.0 however it is IMO not a blocker for 3.0 either.