private static KeyStore createKeyStore(final URL storeFile, final String password) throws ClientSslSocketFactoryException {
    	
    	if(storeFile == null){
    		return null;
    	}
    	
    	Preconditions.checkArgument(StringUtils.isNotEmpty(password), "Null keystore should have empty password, defined keystore must have password");
    	
    	KeyStore keyStore = null;
    	
    	try{
    		keyStore = KeyStore.getInstance("jks");

    		InputStream is = storeFile.openStream();

    		try {
    			keyStore.load(is, password.toCharArray());
    		} catch (NoSuchAlgorithmException e) {
    			throw new ClientSslSocketFactoryException(String.format("Failed to create a keystore that supports algorithm %s: %s", SOCKET_ALGORITHM, e.getMessage()), e);
			} catch (CertificateException e) {
				throw new ClientSslSocketFactoryException(String.format("Failed to create keystore with algorithm %s due to certificate exception: %s", SOCKET_ALGORITHM, e.getMessage()), e);
			} finally {
    			try {
    				is.close();
    			} catch (IOException ignore) { // NOPMD    				
    			}
    		}
    	}catch(KeyStoreException e){
    		throw new ClientSslSocketFactoryException(String.format("KeyStore exception creating keystore: %s", e.getMessage()), e);
    	} catch (IOException e) {
    		throw new ClientSslSocketFactoryException(String.format("IO exception creating keystore: %s", e.getMessage()), e);
		}

        return keyStore;
    }
Opens the specified key or trust store using the given password.

In case of failure {@link com.netflix.client.ssl.ClientSslSocketFactoryException} is thrown, and wrapps the
underlying cause exception. That could be:
<ul>
    <li>KeyStoreException if the JRE doesn't support the standard Java Keystore format, in other words: never</li>
    <li>NoSuchAlgorithmException if the algorithm used to check the integrity of the keystore cannot be found</li>
    <li>CertificateException if any of the certificates in the keystore could not be loaded</li>
    <li>
        IOException if there is an I/O or format problem with the keystore data, if a
        password is required but not given, or if the given password was incorrect. If the
        error is due to a wrong password, the cause of the IOException should be an UnrecoverableKeyException.
    </li>
</ul>

@param storeFile the location of the store to load
@param password the password protecting the store
@return the newly loaded key store
@throws ClientSslSocketFactoryException a wrapper exception for any problems encountered during keystore creation.
ribbon-core/src/main/java/com/netflix/client/ssl/URLSslContextFactory.java