Class KeyStoreFileCertificateSource

  • All Implemented Interfaces:
    CertificateAndKeySource

    public class KeyStoreFileCertificateSource
    extends java.lang.Object
    implements CertificateAndKeySource
    Loads a KeyStore from a file or classpath resource. If configured with a File object, attempts to load the KeyStore from the specified file. Otherwise, attempts to load the KeyStore from a classpath resource.
    • Constructor Detail

      • KeyStoreFileCertificateSource

        public KeyStoreFileCertificateSource​(java.lang.String keyStoreType,
                                             java.lang.String keyStoreClasspathResource,
                                             java.lang.String privateKeyAlias,
                                             java.lang.String keyStorePassword)
        Creates a CertificateAndKeySource that loads an existing KeyStore from a classpath resource.
        Parameters:
        keyStoreType - the KeyStore type, such as PKCS12 or JKS
        keyStoreClasspathResource - classpath resource to load (for example, "/keystore.jks")
        privateKeyAlias - the alias of the private key in the KeyStore
        keyStorePassword - te KeyStore password
      • KeyStoreFileCertificateSource

        public KeyStoreFileCertificateSource​(java.lang.String keyStoreType,
                                             java.io.File keyStoreFile,
                                             java.lang.String privateKeyAlias,
                                             java.lang.String keyStorePassword)
        Creates a CertificateAndKeySource that loads an existing KeyStore from a classpath resource.
        Parameters:
        keyStoreType - the KeyStore type, such as PKCS12 or JKS
        keyStoreFile - KeyStore file to load
        privateKeyAlias - the alias of the private key in the KeyStore
        keyStorePassword - te KeyStore password