Class Name


  • public final class Name
    extends Object
    X.501 Name
    • Field Detail

      • ASN1_RDN

        public static final ASN1SetOf ASN1_RDN
        According to RFC 3280 (http://www.ietf.org/rfc/rfc3280.txt) X.501 Name structure is defined as follows: Name ::= CHOICE { RDNSequence } RDNSequence ::= SEQUENCE OF RelativeDistinguishedName RelativeDistinguishedName ::= SET OF AttributeTypeAndValue
    • Constructor Detail

      • Name

        public Name​(byte[] encoding)
             throws IOException
        Creates new Name instance from its DER encoding
        Parameters:
        encoding - - ASN.1 DER encoding
        Throws:
        IOException - - if encoding is wrong
      • Name

        public Name​(String name)
             throws IOException
        Creates new Name instance
        Parameters:
        name - - Name as String
        Throws:
        IOException - - if string is wrong
    • Method Detail

      • getX500Principal

        public X500Principal getX500Principal()
        Returns X500Principal instance corresponding to this Name instance
        Returns:
        equivalent X500Principal object
      • getName

        public String getName​(String format)
        Returns Relative Distinguished Name as String according the format requested
        Parameters:
        format - one of X500Principal.CANONICAL, X500Principal.RFC1779, or X500Principal.RFC2253, case insensitive
      • getEncoded

        public byte[] getEncoded()
        Gets encoded form of DN
        Returns:
        return encoding, no copying is performed