Class JcaJceUtils


  • public class JcaJceUtils
    extends java.lang.Object
    General utility methods for building common objects for supporting the JCA/JCE/JSSE.
    • Constructor Summary

      Constructors 
      Constructor Description
      JcaJceUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static javax.net.ssl.KeyManagerFactory createKeyManagerFactory​(java.lang.String type, java.lang.String provider, java.security.KeyStore clientKeyStore, char[] clientKeyStorePass)  
      static javax.net.ssl.X509TrustManager[] getCertPathTrustManager​(java.util.Set<java.security.cert.TrustAnchor> anchors, java.security.cert.CRL[] revocationLists)  
      static javax.net.ssl.X509TrustManager getTrustAllTrustManager()  
      static void validateServerCertUsage​(java.security.cert.X509Certificate x509Certificate)  
      • Methods inherited from class java.lang.Object

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

      • JcaJceUtils

        public JcaJceUtils()
    • Method Detail

      • getTrustAllTrustManager

        public static javax.net.ssl.X509TrustManager getTrustAllTrustManager()
      • getCertPathTrustManager

        public static javax.net.ssl.X509TrustManager[] getCertPathTrustManager​(java.util.Set<java.security.cert.TrustAnchor> anchors,
                                                                               java.security.cert.CRL[] revocationLists)
      • validateServerCertUsage

        public static void validateServerCertUsage​(java.security.cert.X509Certificate x509Certificate)
                                            throws java.security.cert.CertificateException
        Throws:
        java.security.cert.CertificateException
      • createKeyManagerFactory

        public static javax.net.ssl.KeyManagerFactory createKeyManagerFactory​(java.lang.String type,
                                                                              java.lang.String provider,
                                                                              java.security.KeyStore clientKeyStore,
                                                                              char[] clientKeyStorePass)
                                                                       throws java.security.UnrecoverableKeyException,
                                                                              java.security.NoSuchAlgorithmException,
                                                                              java.security.KeyStoreException,
                                                                              java.security.NoSuchProviderException
        Throws:
        java.security.UnrecoverableKeyException
        java.security.NoSuchAlgorithmException
        java.security.KeyStoreException
        java.security.NoSuchProviderException