}
public SSLContext createSSLContext(String provider, String protocol, String algorithm, String keyStore, String keyAlias, String trustStore, long timeout) throws GeneralSecurityException {
if (!this.checkForKeystoresAvailability(keyStore, keyAlias, trustStore, timeout)) {
throw new GeneralSecurityException("Unable to lookup configured keystore and/or truststore");
}
KeystoreInstance keyInstance = getKeystore(keyStore);
if (keyInstance != null && keyInstance.isKeystoreLocked()) {
throw new KeystoreIsLocked("Keystore '" + keyStore + "' is locked");