@Override public SSLContext newContext(SSLContextType type) throws KeyStoreException { try { return SecurityUtils.createSSLContext( type, SecurityUtils.createKeyManagers(handler.getKeyStore(), configuration.getPassword()), SecurityUtils.createTrustManagers(handler.getKeyStore())); } catch (Exception e) { throw new KeyStoreException("Failed to create new context", e); } }
@Override public X509Certificate[] getChain(String alias) throws KeyStoreException { Certificate[] chain = handler.getKeyStore().getCertificateChain(alias); X509Certificate[] certificates = new X509Certificate[chain.length]; for (int i = 0; i < chain.length; i++) certificates[i] = (X509Certificate) chain[i]; return certificates; }
@Override public KeyStore getKeyStore() { return handler.getKeyStore(); }