rcgen
rcgen copied to clipboard
Enforce extension uniqueness
As a breaking API change rcgen should refuse to generate certificates with duplicate extensions.
RFC 5280 §4.2 says:
A certificate MUST NOT include more than one instance of a particular extension.
This can occur with the current API in two ways:
- Specifying duplicate extensions within
CertificateParams.custom_extensions - Specifying an extension in
CertificateParams.custom_extensionsthat has the same OID as an extensionrcgenemits natively (e.g.id-ce-subjectAltName,id-ce-authorityKeyIdentifier, etc).