Package org.cryptacular.x509.dn
Class NameReader
java.lang.Object
org.cryptacular.x509.dn.NameReader
Reads X.509 subject and issuer DNs as a raw sequence of attributes to facilitate precise handling of name parsing.
- Author:
- Middleware Services
-
Constructor Summary
ConstructorsConstructorDescriptionNameReader
(X509Certificate cert) Creates a new instance to support reading subject and issuer information on the given certificate. -
Method Summary
Modifier and TypeMethodDescriptionReads the issuer field from the certificate.Reads the subject field from the certificate.static RDNSequence
readX500Principal
(X500Principal principal) Converts the given X.500 principal to a list of relative distinguished names that contains the attributes comprising the DN.
-
Constructor Details
-
NameReader
Creates a new instance to support reading subject and issuer information on the given certificate.- Parameters:
cert
- Certificate to read.
-
-
Method Details
-
readSubject
Reads the subject field from the certificate.- Returns:
- Subject DN as an RDN sequence.
-
readIssuer
Reads the issuer field from the certificate.- Returns:
- Issuer DN as an RDN sequence.
-
readX500Principal
Converts the given X.500 principal to a list of relative distinguished names that contains the attributes comprising the DN.- Parameters:
principal
- Principal to convert.- Returns:
- X500 principal as an RDN sequence.
-