Package net.dona.doip.util.tls
Class X509IdParser
java.lang.Object
net.dona.doip.util.tls.X509IdParser
Utility methods to parse a (handle) identity from an X509 certificate.
The identity will be taken from the subject's distinguished name; it will
use the first available UID attribute if present,
otherwise the first available CN attribute if present,
otherwise the first available O attribute if present.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Parses the identity handle from the certificate.static String
parseIdentityHandle
(X509Certificate[] cert) Parses the identity handle from the first certificate in a chain.
-
Constructor Details
-
X509IdParser
public X509IdParser()
-
-
Method Details
-
parseIdentityHandle
Parses the identity handle from the certificate.- Parameters:
cert
- the certificate- Returns:
- the identity handle
-
parseIdentityHandle
Parses the identity handle from the first certificate in a chain.- Parameters:
cert
- the certificate chain- Returns:
- the identity handle
-