Class OtherNameAsn1Parser


  • public class OtherNameAsn1Parser
    extends Object
    A minimalist ASN.1 parser for X.509 SAN:otherName according to RFC 5280, section 4.2.1.6.

    It properly takes JDK-6776681 into account and solves JDK-8277976.

    • Method Detail

      • parse

        public static OtherNameParseResult parse​(byte[] otherName)
        Parses the DER-encoded ASN.1 SAN:otherName field into its components: type-id and value.
        Parameters:
        otherName - a DER-encoded byte array
        Returns:
        the parse result
        Throws:
        NullPointerException - if otherName is null
        IllegalArgumentException - if otherName is empty or if the DER-encoded byte array does not comply with ASN.1 DER encoding rules