org.springframework.boot.web.server

Class CertificateFileSslStoreProvider

  • java.lang.Object
    • org.springframework.boot.web.server.CertificateFileSslStoreProvider
  • All Implemented Interfaces:
    SslStoreProvider


    public final class CertificateFileSslStoreProvider
    extends java.lang.Object
    implements SslStoreProvider
    An SslStoreProvider that creates key and trust stores from certificate and private key PEM files.
    Since:
    2.7.0
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      static SslStoreProvider from(Ssl ssl)
      Create an SslStoreProvider if the appropriate SSL properties are configured.
      java.lang.String getKeyPassword()
      Return the password of the private key in the key store.
      java.security.KeyStore getKeyStore()
      Return the key store that should be used.
      java.security.KeyStore getTrustStore()
      Return the trust store that should be used.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getKeyStore

        public java.security.KeyStore getKeyStore()
                                           throws java.lang.Exception
        Description copied from interface: SslStoreProvider
        Return the key store that should be used.
        Specified by:
        getKeyStore in interface SslStoreProvider
        Returns:
        the key store to use
        Throws:
        java.lang.Exception - on load error
      • getTrustStore

        public java.security.KeyStore getTrustStore()
                                             throws java.lang.Exception
        Description copied from interface: SslStoreProvider
        Return the trust store that should be used.
        Specified by:
        getTrustStore in interface SslStoreProvider
        Returns:
        the trust store to use
        Throws:
        java.lang.Exception - on load error
      • getKeyPassword

        public java.lang.String getKeyPassword()
        Description copied from interface: SslStoreProvider
        Return the password of the private key in the key store.
        Specified by:
        getKeyPassword in interface SslStoreProvider
        Returns:
        the key password
      • from

        public static SslStoreProvider from(Ssl ssl)
        Create an SslStoreProvider if the appropriate SSL properties are configured.
        Parameters:
        ssl - the SSL properties
        Returns:
        an SslStoreProvider or null