com.webmethods.sc.directory.cert
Interface ICertificateManager


public interface ICertificateManager

Certificate Manager. Implements all manager and mapping of x509 Certificates functionality


Field Summary
static String CERTIFICATE_MAPPER_IMPL
          Prefix for System property which identifies custom implementations of certificate mappers.
 
Method Summary
 ICertificate createCertificate(X509Certificate x509Certificate, String type)
          Creates new certificate of the given type.
 void deleteCertificate(String certificateID)
          Deletes specified certificate from the database
 ICertificate getCertificateByID(String certificateID)
          Returns ICertificate by its ID
 ICertificate getCertificateByX509(X509Certificate x509Certificate)
          Takes X509 certificate and return a matching SSL (default) type ICertificate object or null of not found
 ICertificate getCertificateByX509(X509Certificate x509Certificate, String type)
          Takes X509 certificate and its type and return a matching ICertificate object or null of not found
 ICertificateMapper getCertificateMapper()
          Returns instance of default certificate mapper implementation
 List getCertificatesByIssuerSerial(String issuerDN, String serialNumber, String type)
          Gets certificates for given issuerDN and serial number.
 List getCertificatesBySKI(byte[] ski, String type)
          Gets certificates list for the given SubjectKeyIdentifier extension value
 List getCertificatesBySubjectDN(String subjectDN, String type)
          Gets certificates list for given subjectDN value
 List getCertificatesByThumbprint(byte[] thumbprint, String type)
          Gets certificates list for the given SubjectKeyIdentifier extension value
 List listCertificates()
          Lists all stored certificates
 void updateCertificate(String certificateID, X509Certificate x509Certificate, String type)
          Updates existing certificate preserving all its mappings
 

Field Detail

CERTIFICATE_MAPPER_IMPL

static final String CERTIFICATE_MAPPER_IMPL
Prefix for System property which identifies custom implementations of certificate mappers. If there is a custom implementation of the mapper, then its implementation class should be set for the following system property

See Also:
Constant Field Values
Method Detail

getCertificateByX509

ICertificate getCertificateByX509(X509Certificate x509Certificate)
                                  throws DirectoryException
Takes X509 certificate and return a matching SSL (default) type ICertificate object or null of not found

Parameters:
x509Certificate -
Returns:
ICertificate object representing SSL type x509Certificate
Throws:
DirectoryException

getCertificateByX509

ICertificate getCertificateByX509(X509Certificate x509Certificate,
                                  String type)
                                  throws DirectoryException
Takes X509 certificate and its type and return a matching ICertificate object or null of not found

Parameters:
x509Certificate -
type - certificate type. See ICertificate for type constants
Returns:
ICertificate object representing x509Certificate
Throws:
DirectoryException

getCertificateByID

ICertificate getCertificateByID(String certificateID)
                                throws DirectoryException
Returns ICertificate by its ID

Parameters:
certificateID - certificate ID to retrieve
Returns:
valid ICertificate or null of not found by given ID
Throws:
DirectoryException

getCertificatesByIssuerSerial

List getCertificatesByIssuerSerial(String issuerDN,
                                   String serialNumber,
                                   String type)
                                   throws DirectoryException
Gets certificates for given issuerDN and serial number. Most of the case only single certificate is returned. In some rare cases it may be more than one

Parameters:
issuerDN - issuer DN String value
serialNumber - serial number String value
type - type of the certificates to return. Specifying null will return certificates of any type. See ICertificate for type constants
Returns:
list of ICertificate objects
Throws:
DirectoryException

getCertificatesBySubjectDN

List getCertificatesBySubjectDN(String subjectDN,
                                String type)
                                throws DirectoryException
Gets certificates list for given subjectDN value

Parameters:
subjectDN - String value of subject DN
type - type of the certificates to return. Specifying null will return certificates of any type. See ICertificate for type constants
Returns:
list of ICertificate objects
Throws:
DirectoryException

getCertificatesBySKI

List getCertificatesBySKI(byte[] ski,
                          String type)
                          throws DirectoryException
Gets certificates list for the given SubjectKeyIdentifier extension value

Parameters:
ski - byte[] value of SubjectKeyIdentifier
type - type of the certificates to return. Specifying null will return certificates of any type. See ICertificate for type constants
Returns:
list of ICertificate object
Throws:
DirectoryException

getCertificatesByThumbprint

List getCertificatesByThumbprint(byte[] thumbprint,
                                 String type)
                                 throws DirectoryException
Gets certificates list for the given SubjectKeyIdentifier extension value

Parameters:
thumbprint - byte[] value of certificate thumbprint (SHA-1 hash value of certificate)
type - type of the certificates to return. Specifying null will return certificates of any type. See ICertificate for type constants
Returns:
list of ICertificate object
Throws:
DirectoryException

listCertificates

List listCertificates()
                      throws DirectoryException
Lists all stored certificates

Throws:
DirectoryException

createCertificate

ICertificate createCertificate(X509Certificate x509Certificate,
                               String type)
                               throws DirectoryException
Creates new certificate of the given type. This operation does not check if the certificate of the same type already exist and thus may upload a store multiple identical certificates

Parameters:
x509Certificate -
type - certificate type, see ICertificate for type constants
Throws:
DirectoryException

updateCertificate

void updateCertificate(String certificateID,
                       X509Certificate x509Certificate,
                       String type)
                       throws DirectoryException
Updates existing certificate preserving all its mappings

Parameters:
certificateID - ID of an existing certificate.
x509Certificate - new X509 cert to update
type - certificate type, see ICertificate for type constants
Throws:
DirectoryException

deleteCertificate

void deleteCertificate(String certificateID)
                       throws DirectoryException
Deletes specified certificate from the database

Parameters:
certificateID - certificate ID to delete
Throws:
DirectoryException

getCertificateMapper

ICertificateMapper getCertificateMapper()
                                        throws DirectoryException
Returns instance of default certificate mapper implementation

Throws:
DirectoryException