SSLContext getSSLContext ( String protocol , KeyManager [ ] keyManagers , TrustManager [ ] trustManagers ) { try { SSLContext sslContext = SSLContext . getInstance ( protocol ) ; sslContext . init ( keyManagers , trustManagers , null ) ; return sslContext ; } catch ( NoSuchAlgorithmException e ) { throw SeedException . wrap ( e , CryptoErrorCode . ALGORITHM_CANNOT_BE_FOUND ) ; } catch ( Exception e ) { throw SeedException . wrap ( e , CryptoErrorCode . UNEXPECTED_EXCEPTION ) ; } }
Gets an SSLContext configured and initialized .