Class JSSEUtil

  • All Implemented Interfaces:
    SSLUtil

    public class JSSEUtil
    extends SSLUtilBase
    SSLUtil implementation for JSSE.
    Author:
    Harish Prabandham, Costin Manolache, Stefan Freyr Stefansson, EKR, Jan Luehe
    • Method Detail

      • createSSLContext

        public SSLContext createSSLContext​(java.util.List<java.lang.String> negotiableProtocols)
                                    throws java.security.NoSuchAlgorithmException
        Throws:
        java.security.NoSuchAlgorithmException
      • getKeyManagers

        public javax.net.ssl.KeyManager[] getKeyManagers()
                                                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getTrustManagers

        public javax.net.ssl.TrustManager[] getTrustManagers()
                                                      throws java.lang.Exception
        Throws:
        java.lang.Exception
      • configureSessionContext

        public void configureSessionContext​(javax.net.ssl.SSLSessionContext sslSessionContext)
      • getParameters

        protected java.security.cert.CertPathParameters getParameters​(java.lang.String crlf,
                                                                      java.security.KeyStore trustStore,
                                                                      boolean revocationEnabled)
                                                               throws java.lang.Exception
        Return the initialization parameters for the TrustManager. Currently, only the default PKIX is supported.
        Parameters:
        crlf - The path to the CRL file.
        trustStore - The configured TrustStore.
        revocationEnabled - Should the JSSE provider perform revocation checks? Ignored if crlf is non-null. Configuration of revocation checks are expected to be via proprietary JSSE provider methods.
        Returns:
        The parameters including the CRLs and TrustStore.
        Throws:
        java.lang.Exception - An error occurred
      • getCRLs

        protected java.util.Collection<? extends java.security.cert.CRL> getCRLs​(java.lang.String crlf)
                                                                          throws java.io.IOException,
                                                                                 java.security.cert.CRLException,
                                                                                 java.security.cert.CertificateException
        Load the collection of CRLs.
        Parameters:
        crlf - The path to the CRL file.
        Returns:
        the CRLs collection
        Throws:
        java.io.IOException - Error reading CRL file
        java.security.cert.CRLException - CRL error
        java.security.cert.CertificateException - Error processing certificate