Search code examples
opensslssl-certificatecertificatex509certificatebouncycastle

X509 certificates - Subject identifiers of arbitrary types like UUID


What are other ways to add subject identifiers of arbitrary types in X509 certificates? Consider the following subject and its properties:

Person
- id: UUID
- username: String
- domain: String
- organizationName: String

I'm considering having the username, domain, and organizationName to form the subject DN. But what would be the ideal way to include the id, which is a UUID? Can we have it included on the Subject Alternative Name extension? If yes, what would be the GeneralName tag? If we can have it on the subject DN, what would be the appropriate RDN to use?


Solution

  • We can convert the UUID as an OID and include it on the Subject Alternative Name extension as GeneralName.RegisteredId