Package com.netscape.cms.servlet.csadmin
Class Configurator
java.lang.Object
com.netscape.cms.servlet.csadmin.Configurator
Utility class for functions to be used by the RESTful installer.
- Author:
- alee
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic String
static final BigInteger
static ConfigCertApprovalCallback
protected EngineConfig
protected CMSEngine
static String
static final org.slf4j.Logger
static final Long
protected ServerXml
static String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
createAdminCertificate
(SystemCertData certData) static PKIClient
createClient
(String serverURL, String clientnickname, org.mozilla.jss.ssl.SSLCertificateApprovalCallback certApprovalCallback) createECCKeyPair
(String tag, org.mozilla.jss.crypto.CryptoToken token, String curveName, String ecType) This method creates an ECC keypair for a system cert.org.mozilla.jss.netscape.security.x509.X509CertImpl
createLocalCert
(String keyAlgorithm, org.mozilla.jss.netscape.security.x509.X509Key x509key, String profileID, String[] dnsNames, boolean installAdjustValidity, PrivateKey signingPrivateKey, String signingAlgorithm, String certRequestType, byte[] certRequest, org.mozilla.jss.netscape.security.x509.X500Name issuerName, org.mozilla.jss.netscape.security.x509.X500Name subjectName, RequestId requestID) org.mozilla.jss.netscape.security.pkcs.PKCS10
createPKCS10Request
(String tag, KeyPair keyPair, String subjectDN, String algorithm, String extOID, String extData, boolean extCritical) org.mozilla.jss.netscape.security.x509.X509CertImpl
createRemoteCert
(String hostname, int port, String profileID, String certRequestType, byte[] request, String[] dnsNames, InstallToken installToken) createRSAKeyPair
(String tag, org.mozilla.jss.crypto.CryptoToken token, String keySize) getContentValue
(String body, String header) getInstallToken
(String sdhost, int sdport, String user, String passwd) getOldCookie
(String sdhost, int sdport, String user, String passwd) void
importCert
(org.mozilla.jss.netscape.security.x509.X509Key x509key, org.mozilla.jss.netscape.security.x509.X509CertImpl cert, String profileID, String[] dnsNames, boolean installAdjustValidity, String certRequestType, byte[] certRequest, org.mozilla.jss.netscape.security.x509.X500Name subjectName, RequestId requestID) void
loadKeyPair
(org.mozilla.jss.crypto.X509Certificate cert) void
void
setServerXml
(ServerXml serverXml) setupCert
(CertificateSetupRequest request)
-
Field Details
-
logger
public static final org.slf4j.Logger logger -
SUCCESS
-
FAILURE
-
AUTH_FAILURE
-
BIG_ZERO
-
MINUS_ONE
-
certApprovalCallback
-
engine
-
cs
-
serverXml
-
-
Constructor Details
-
Configurator
-
-
Method Details
-
createClient
public static PKIClient createClient(String serverURL, String clientnickname, org.mozilla.jss.ssl.SSLCertificateApprovalCallback certApprovalCallback) throws Exception - Throws:
Exception
-
setConfigStore
-
setServerXml
- Throws:
Exception
-
getInstallToken
public String getInstallToken(String sdhost, int sdport, String user, String passwd) throws Exception - Throws:
Exception
-
getOldCookie
- Throws:
Exception
-
getContentValue
-
createRequestID
- Throws:
Exception
-
loadKeyPair
- Throws:
Exception
-
createECCKeyPair
public KeyPair createECCKeyPair(String tag, org.mozilla.jss.crypto.CryptoToken token, String curveName, String ecType) throws Exception This method creates an ECC keypair for a system cert. For ECDHE SSL server cert, server.xml should have the following ciphers: +TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, -TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA For ECDH SSL server cert, server.xml should have the following ciphers: -TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA, +TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA- Throws:
Exception
-
createRSAKeyPair
public KeyPair createRSAKeyPair(String tag, org.mozilla.jss.crypto.CryptoToken token, String keySize) throws Exception - Throws:
Exception
-
createLocalCert
public org.mozilla.jss.netscape.security.x509.X509CertImpl createLocalCert(String keyAlgorithm, org.mozilla.jss.netscape.security.x509.X509Key x509key, String profileID, String[] dnsNames, boolean installAdjustValidity, PrivateKey signingPrivateKey, String signingAlgorithm, String certRequestType, byte[] certRequest, org.mozilla.jss.netscape.security.x509.X500Name issuerName, org.mozilla.jss.netscape.security.x509.X500Name subjectName, RequestId requestID) throws Exception - Throws:
Exception
-
createRemoteCert
public org.mozilla.jss.netscape.security.x509.X509CertImpl createRemoteCert(String hostname, int port, String profileID, String certRequestType, byte[] request, String[] dnsNames, InstallToken installToken) throws Exception - Throws:
Exception
-
createPKCS10Request
public org.mozilla.jss.netscape.security.pkcs.PKCS10 createPKCS10Request(String tag, KeyPair keyPair, String subjectDN, String algorithm, String extOID, String extData, boolean extCritical) throws Exception - Throws:
Exception
-
importCert
public void importCert(org.mozilla.jss.netscape.security.x509.X509Key x509key, org.mozilla.jss.netscape.security.x509.X509CertImpl cert, String profileID, String[] dnsNames, boolean installAdjustValidity, String certRequestType, byte[] certRequest, org.mozilla.jss.netscape.security.x509.X500Name subjectName, RequestId requestID) throws Exception - Throws:
Exception
-
setupCert
- Throws:
Exception
-
initSubsystem
- Throws:
Exception
-
createAdminCertificate
- Throws:
Exception
-