Package com.iplanet.security.x509
Class CertUtils
- java.lang.Object
-
- com.iplanet.security.x509.CertUtils
-
public class CertUtils extends Object
This class provides utility methods to read the certificate DN information in a format that is understandable across OpenAM.
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOMMON_NAMEstatic StringEMAIL_ADDRESSstatic StringMAILstatic StringUID
-
Constructor Summary
Constructors Constructor Description CertUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringgetAttributeValue(X500Principal principal, String attributeName)Retrieves a given attribute value from the providedX500Principaleven if the attribute was enclosed in a multi-valued RDN.static StringgetIssuerName(X509Certificate cert)Returns the Issuer Name from theX509Certificate's issuerX500Principal.static StringgetSubjectName(X509Certificate cert)Returns the Subject Name from theX509Certificate's subjectX500Principal.
-
-
-
Field Detail
-
COMMON_NAME
public static final String COMMON_NAME
- See Also:
- Constant Field Values
-
MAIL
public static final String MAIL
- See Also:
- Constant Field Values
-
EMAIL_ADDRESS
public static final String EMAIL_ADDRESS
- See Also:
- Constant Field Values
-
UID
public static final String UID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getSubjectName
public static String getSubjectName(X509Certificate cert)
Returns the Subject Name from theX509Certificate's subjectX500Principal.- Parameters:
cert- X509 Certificate Object.- Returns:
- null if the SubjectDN can not be obtained.
-
getIssuerName
public static String getIssuerName(X509Certificate cert)
Returns the Issuer Name from theX509Certificate's issuerX500Principal.- Parameters:
cert- X509 Certificate Object.- Returns:
- null if the IssuerDN can not be obtained.
-
getAttributeValue
public static String getAttributeValue(X500Principal principal, String attributeName)
Retrieves a given attribute value from the providedX500Principaleven if the attribute was enclosed in a multi-valued RDN.- Parameters:
principal- The principal to retrieve the value from.attributeName- The non-null name of the attribute to retrieve.- Returns:
- The attribute value from the principal.
-
-