public class WebCertificates
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
CERTS_ROOT
The root node for certificates
|
private java.security.cert.CertificateFactory |
cf
X.509 certificate factory
|
private SSLCertFactory |
factory
Certificates builder
|
private static java.lang.String |
WEB_ROOT_CERTS
The root node for web certificates
|
Constructor and Description |
---|
WebCertificates()
The default constructor
|
WebCertificates(SSLCertFactory factory)
Creates parameterized web certificates reader.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getPrivateKeyPassword(DirectoryService ds,
java.lang.String serverId)
Reads the password that is used to encrypt the web private certificate for the given server.
|
java.lang.String |
getWebAlias(DirectoryService ds,
java.lang.String serverId)
Reads web alias for the given server.
|
SSLCertFactory.CertificateSuite |
getWebCertificates(DirectoryService ds,
java.lang.String serverId)
Reads web certificates from the directory for the given server.
|
void |
setCertificateSuite(SSLCertFactory.CertificateSuite suite,
DirectoryService ds,
java.lang.String serverId,
java.lang.String alias,
java.lang.String keyPassword)
Writes the given certificate suite into the directory located by
/security/certificates/webCertificates/serverId.
|
private static final java.lang.String CERTS_ROOT
private static final java.lang.String WEB_ROOT_CERTS
private final SSLCertFactory factory
private final java.security.cert.CertificateFactory cf
public WebCertificates() throws SSLCertGenException
SSLCertGenException
- If BCCertFactory can't be instantiated.public WebCertificates(SSLCertFactory factory) throws SSLCertGenException
factory
- The SSL certificates utilitySSLCertGenException
- If CertificateFactory can't be instantiated.public java.lang.String getWebAlias(DirectoryService ds, java.lang.String serverId)
ds
- The directory serviceserverId
- The server identifierSSLCertGenException
- If the web alias can't be read due to the current settingspublic java.lang.String getPrivateKeyPassword(DirectoryService ds, java.lang.String serverId)
ds
- The directory serviceserverId
- The server identifierSSLCertGenException
- If the private key password can't be read due to the current settingspublic SSLCertFactory.CertificateSuite getWebCertificates(DirectoryService ds, java.lang.String serverId) throws SSLCertGenException
ds
- The directory serviceserverId
- The server identifierSSLCertGenException
- If web certificates can't be read due to the current settingspublic void setCertificateSuite(SSLCertFactory.CertificateSuite suite, DirectoryService ds, java.lang.String serverId, java.lang.String alias, java.lang.String keyPassword) throws SSLCertGenException
suite
- The given certificate suiteds
- The directory serviceserverId
- The server identifieralias
- The web certificate aliaskeyPassword
- The private key passwordSSLCertGenException
- If it is failed.