public final class CertManager extends Object
| Modifier and Type | Method and Description |
|---|---|
static LinkedHashMap<BigInteger,X509Certificate> |
getCertificateMap(CertPath certPath,
X509Certificate root)
Returns map containing all certificates from the given certification path.
|
static X509Certificate[] |
search(String cn,
String serialNumber,
String uid)
Performs a certificate search by the given filter parameters.
|
public static LinkedHashMap<BigInteger,X509Certificate> getCertificateMap(CertPath certPath, X509Certificate root)
certPath - the certification path.root - the root certificate of the given certification path.public static X509Certificate[] search(String cn, String serialNumber, String uid) throws NamingException, CertificateException
For a certificate to be selected, each of the given filter parameters must match the appropriate attribute.
Each of the filter parameters is optional, but one of them is mandatory for a successful search operation. The format and interpretation of filter parameters follows 'The String Representation of LDAP Search Filters' (RFC 2254).
Certificates are searched in a LDAP context specified by the EDOC configuration. An EDOC configuration property ldap.provider.url identifies the location of the LDAP service.
cn - filter value for the 'cn' attribute, or null if this attribute should be omitted.serialNumber - filter value for the 'serialNumber' attribute, or null if this attribute should be omitted.uid - filter value for the 'uid' attribute, or null if this attribute should be omitted.NamingException - if a naming exception is encountered.CertificateException - if a certificate parsing exception is encountered.