Package com.webmethods.sc.directory.cert
Interface ICertificateManager
public interface ICertificateManager
Certificate Manager. Implements all manager and mapping of x509 Certificates functionality
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Prefix for System property which identifies custom implementations of certificate mappers. -
Method Summary
Modifier and TypeMethodDescriptioncreateCertificate
(X509Certificate x509Certificate, String type) Creates new certificate of the given type.void
deleteCertificate
(String certificateID) Deletes specified certificate from the databasegetCertificateByID
(String certificateID) Returns ICertificate by its IDgetCertificateByX509
(X509Certificate x509Certificate) Takes X509 certificate and return a matching SSL (default) type ICertificate object or null of not foundgetCertificateByX509
(X509Certificate x509Certificate, String type) Takes X509 certificate and its type and return a matching ICertificate object or null of not foundReturns instance of default certificate mapper implementationgetCertificatesByIssuerSerial
(String issuerDN, String serialNumber, String type) Gets certificates for given issuerDN and serial number.getCertificatesBySKI
(byte[] ski, String type) Gets certificates list for the given SubjectKeyIdentifier extension valuegetCertificatesBySubjectDN
(String subjectDN, String type) Gets certificates list for given subjectDN valuegetCertificatesByThumbprint
(byte[] thumbprint, String type) Gets certificates list for the given SubjectKeyIdentifier extension valueLists all stored certificatesvoid
updateCertificate
(String certificateID, X509Certificate x509Certificate, String type) Updates existing certificate preserving all its mappings
-
Field Details
-
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:
-
-
Method Details
-
getCertificateByX509
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. SeeICertificate
for type constants- Returns:
- ICertificate object representing x509Certificate
- Throws:
DirectoryException
-
getCertificateByID
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<ICertificate> 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 valueserialNumber
- serial number String valuetype
- type of the certificates to return. Specifying null will return certificates of any type. SeeICertificate
for type constants- Returns:
- list of ICertificate objects
- Throws:
DirectoryException
-
getCertificatesBySubjectDN
List<ICertificate> getCertificatesBySubjectDN(String subjectDN, String type) throws DirectoryException Gets certificates list for given subjectDN value- Parameters:
subjectDN
- String value of subject DNtype
- type of the certificates to return. Specifying null will return certificates of any type. SeeICertificate
for type constants- Returns:
- list of ICertificate objects
- Throws:
DirectoryException
-
getCertificatesBySKI
Gets certificates list for the given SubjectKeyIdentifier extension value- Parameters:
ski
- byte[] value of SubjectKeyIdentifiertype
- type of the certificates to return. Specifying null will return certificates of any type. SeeICertificate
for type constants- Returns:
- list of ICertificate object
- Throws:
DirectoryException
-
getCertificatesByThumbprint
List<ICertificate> 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. SeeICertificate
for type constants- Returns:
- list of ICertificate object
- Throws:
DirectoryException
-
listCertificates
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, seeICertificate
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 updatetype
- certificate type, seeICertificate
for type constants- Throws:
DirectoryException
-
deleteCertificate
Deletes specified certificate from the database- Parameters:
certificateID
- certificate ID to delete- Throws:
DirectoryException
-
getCertificateMapper
Returns instance of default certificate mapper implementation- Throws:
DirectoryException
-