kjur / jsrsasign

The 'jsrsasign' (RSA-Sign JavaScript Library) is an opensource free cryptography library supporting RSA/RSAPSS/ECDSA/DSA signing/validation, ASN.1, PKCS#1/5/8 private/public key, X.509 certificate, CRL, OCSP, CMS SignedData, TimeStamp, CAdES and JSON Web Signature/Token in pure JavaScript.
https://kjur.github.io/jsrsasign
Other
3.27k stars 643 forks source link

GeneralName doesn't support otherName #534

Closed rarf closed 2 years ago

rarf commented 2 years ago

KJUR.asn1.x509.GeneralName doesn't support otherName

GeneralName ::= CHOICE { otherName [0] OtherName, rfc822Name [1] IA5String, dNSName [2] IA5String, x400Address [3] ORAddress, directoryName [4] Name, ediPartyName [5] EDIPartyName, uniformResourceIdentifier [6] IA5String, iPAddress [7] OCTET STRING, registeredID [8] OBJECT IDENTIFIER }

kjur commented 2 years ago
OtherName ::= SEQUENCE {
        type-id    OBJECT IDENTIFIER,
        value      [0] EXPLICIT ANY DEFINED BY type-id }

OtherName value includes ANY. Sorry but there is no plan to support OtherName at this stage.

rarf commented 2 years ago

I sent a pull request #535 my approach is to use ASN1Util.newObject so the developer can pass any ASN1Object, this would simplify my PKCS#10 with otherName generations, to do that now i need to create all the SubjectAltName manualy.