Package javax.net.ssl

Class DistinguishedNameParser


  • public final class DistinguishedNameParser
    extends Object
    A distinguished name (DN) parser. This parser only supports extracting a string value from a DN. It doesn't support values in the hex-string style.
    • Constructor Detail

      • DistinguishedNameParser

        public DistinguishedNameParser​(X500Principal principal)
    • Method Detail

      • findMostSpecific

        public String findMostSpecific​(String attributeType)
        Parses the DN and returns the most significant attribute value for an attribute type, or null if none found.
        Parameters:
        attributeType - attribute type to look for (e.g. "ca")
      • getAllMostSpecificFirst

        public List<String> getAllMostSpecificFirst​(String attributeType)
        Parses the DN and returns all values for an attribute type, in the order of decreasing significance (most significant first).
        Parameters:
        attributeType - attribute type to look for (e.g. "ca")