-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add basic support for Subject Alternative Name OtherName (#209)
Add basic support for `OtherName` in the Subject Alternative Name extension. `OtherName` is used by smart card certificates and also, for instance, to identify nodes in a peer-to-peer network. `OtherName` is defined like this in the [RFC 5280§4.2.1.6](https://datatracker.ietf.org/doc/html/rfc5280#page-38): ``` OtherName ::= SEQUENCE { type-id OBJECT IDENTIFIER, value [0] EXPLICIT ANY DEFINED BY type-id } ``` Which is really close to `AttributeTypeAndValue` that we already support ([RFC 5280§4.1.2.4](https://datatracker.ietf.org/doc/html/rfc5280#section-4.1.2.4)) ``` AttributeTypeAndValue ::= SEQUENCE { type AttributeType, value AttributeValue } AttributeType ::= OBJECT IDENTIFIER AttributeValue ::= ANY -- DEFINED BY AttributeType ``` So I took the same approach while implementing it. I don't try to map the OID with a specific ASN.1 object, as users could define their own. This is the [same approach as OpenSSL](https://www.openssl.org/docs/man3.2/man5/x509v3_config#Subject-Alternative-Name) where users provide the OID, the format and its content.
- Loading branch information
Showing
2 changed files
with
92 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters