logback-android/src/main/java/ch/qos/logback/core/net/ssl/SSLContextFactoryBean.java
private KeyManager[] createKeyManagers(ContextAware context)
      throws NoSuchProviderException, NoSuchAlgorithmException,
      UnrecoverableKeyException, KeyStoreException {

    if (getKeyStore() == null) return null;

    KeyStore keyStore = getKeyStore().createKeyStore();
    context.addInfo(
        "key store of type '" + keyStore.getType()
        + "' provider '" + keyStore.getProvider()
        + "': " + getKeyStore().getLocation());

    KeyManagerFactory kmf = getKeyManagerFactory().createKeyManagerFactory();
    context.addInfo("key manager algorithm '" + kmf.getAlgorithm()
        + "' provider '" + kmf.getProvider() + "'");

    char[] passphrase = getKeyStore().getPassword().toCharArray();
    kmf.init(keyStore, passphrase);
    return kmf.getKeyManagers();
  }
private KeyManager[] createKeyManagers(ContextAware context)
      throws NoSuchProviderException, NoSuchAlgorithmException,
      UnrecoverableKeyException, KeyStoreException {

    if (getKeyStore() == null) return null;

    KeyStore keyStore = getKeyStore().createKeyStore();
    context.addInfo(
        "key store of type '" + keyStore.getType()
        + "' provider '" + keyStore.getProvider()
        + "': " + getKeyStore().getLocation());

    KeyManagerFactory kmf = getKeyManagerFactory().createKeyManagerFactory();
    context.addInfo("key manager algorithm '" + kmf.getAlgorithm()
        + "' provider '" + kmf.getProvider() + "'");

    char[] passphrase = getKeyStore().getPassword().toCharArray();
    kmf.init(keyStore, passphrase);
    return kmf.getKeyManagers();
  }
Creates key managers using the receiver's key store configuration.
@param context context for status messages
@return an array of key managers or {@code null} if no key store
configuration was provided
@throws NoSuchProviderException if a provider specified for one
of the key manager components is not known to the platform
@throws NoSuchAlgorithmException if an algorithm specified for
one of the key manager components is not known to the relevant
provider
@throws KeyStoreException if an error occurs in reading a key store