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 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
      • from

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