Class Configurator

java.lang.Object
com.netscape.cms.servlet.csadmin.Configurator

public class Configurator extends Object
Utility class for functions to be used by the RESTful installer.
Author:
alee
  • Field Details

    • logger

      public static final org.slf4j.Logger logger
    • SUCCESS

      public static String SUCCESS
    • FAILURE

      public static String FAILURE
    • AUTH_FAILURE

      public static String AUTH_FAILURE
    • BIG_ZERO

      public static final BigInteger BIG_ZERO
    • MINUS_ONE

      public static final Long MINUS_ONE
    • certApprovalCallback

      public static ConfigCertApprovalCallback certApprovalCallback
    • engine

      protected CMSEngine engine
    • cs

      protected EngineConfig cs
    • serverXml

      protected ServerXml serverXml
  • Constructor Details

    • Configurator

      public Configurator(CMSEngine engine)
  • Method Details

    • createClient

      public static PKIClient createClient(String serverURL, String clientnickname, org.mozilla.jss.ssl.SSLCertificateApprovalCallback certApprovalCallback) throws Exception
      Throws:
      Exception
    • setConfigStore

      public void setConfigStore(EngineConfig cs)
    • setServerXml

      public void setServerXml(ServerXml serverXml) throws Exception
      Throws:
      Exception
    • getInstallToken

      public String getInstallToken(String sdhost, int sdport, String user, String passwd) throws Exception
      Throws:
      Exception
    • getOldCookie

      public String getOldCookie(String sdhost, int sdport, String user, String passwd) throws Exception
      Throws:
      Exception
    • getContentValue

      public String getContentValue(String body, String header)
    • createRequestID

      public RequestId createRequestID() throws Exception
      Throws:
      Exception
    • loadKeyPair

      public KeyPair loadKeyPair(org.mozilla.jss.crypto.X509Certificate cert) throws Exception
      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

      public SystemCertData setupCert(CertificateSetupRequest request) throws Exception
      Throws:
      Exception
    • initSubsystem

      public void initSubsystem() throws Exception
      Throws:
      Exception
    • createAdminCertificate

      public void createAdminCertificate(SystemCertData certData) throws Exception
      Throws:
      Exception