Class CertificateGenerator

java.lang.Object
org.codice.ddf.security.certificate.generator.CertificateGenerator
All Implemented Interfaces:
CertificateGeneratorMBean

public class CertificateGenerator extends Object implements CertificateGeneratorMBean
  • Constructor Details

    • CertificateGenerator

      public CertificateGenerator()
  • Method Details

    • configureDemoCertWithDefaultHostname

      public String configureDemoCertWithDefaultHostname()
      Generates new signed certificate. The hostname is used as the certificate's common name. Postcondition is the server keystore is updated to include a private entry. The private entry has the new certificate chain that connects the server to the Demo CA. The matching private key is also stored in the entry. All other private keys will be removed.
      Specified by:
      configureDemoCertWithDefaultHostname in interface CertificateGeneratorMBean
      Returns:
      the string used as the common name in the new certificate
    • configureDemoCert

      public String configureDemoCert(String commonName)
      Generates new signed certificate. The input parameter is used as the certificate's common name. Postcondition is the server keystore is updated to include a private entry. The private entry has the new certificate chain that connects the server to the Demo CA. The matching private key is also stored in the entry. All other private keys will be removed.
      Specified by:
      configureDemoCert in interface CertificateGeneratorMBean
      Parameters:
      commonName - string to use as the common name in the new certificate.
      Returns:
      the string used as the common name in the new certificate
    • getKeyStoreFile

      public KeyStoreFile getKeyStoreFile()
    • registerMbean

      protected void registerMbean()