jooby/src/main/java/org/jooby/internal/ssl/JdkSslContext.java
protected static KeyManagerFactory buildKeyManagerFactory(final File certChainFile,
      final String keyAlgorithm, final File keyFile, final String keyPassword)
          throws KeyStoreException, NoSuchAlgorithmException, NoSuchPaddingException,
          InvalidKeySpecException, InvalidAlgorithmParameterException, IOException,
          CertificateException, KeyException, UnrecoverableKeyException {
    char[] keyPasswordChars = keyPassword == null ? EMPTY_CHARS : keyPassword.toCharArray();
    KeyStore ks = buildKeyStore(certChainFile, keyFile, keyPasswordChars);
    KeyManagerFactory kmf = KeyManagerFactory.getInstance(keyAlgorithm);
    kmf.init(ks, keyPasswordChars);

    return kmf;
  }
protected static KeyManagerFactory buildKeyManagerFactory(final File certChainFile,
      final String keyAlgorithm, final File keyFile, final String keyPassword)
          throws KeyStoreException, NoSuchAlgorithmException, NoSuchPaddingException,
          InvalidKeySpecException, InvalidAlgorithmParameterException, IOException,
          CertificateException, KeyException, UnrecoverableKeyException {
    char[] keyPasswordChars = keyPassword == null ? EMPTY_CHARS : keyPassword.toCharArray();
    KeyStore ks = buildKeyStore(certChainFile, keyFile, keyPasswordChars);
    KeyManagerFactory kmf = KeyManagerFactory.getInstance(keyAlgorithm);
    kmf.init(ks, keyPasswordChars);

    return kmf;
  }
protected static KeyManagerFactory buildKeyManagerFactory ( final File certChainFile , final String keyAlgorithm , final File keyFile , final String keyPassword ) throws KeyStoreException , NoSuchAlgorithmException , NoSuchPaddingException , InvalidKeySpecException , InvalidAlgorithmParameterException , IOException , CertificateException , KeyException , UnrecoverableKeyException { char [ ] keyPasswordChars = keyPassword == null ? EMPTY_CHARS : keyPassword . toCharArray ( ) ; KeyStore ks = buildKeyStore ( certChainFile , keyFile , keyPasswordChars ) ; KeyManagerFactory kmf = KeyManagerFactory . getInstance ( keyAlgorithm ) ; kmf . init ( ks , keyPasswordChars ) ; return kmf ; }
Build a {@link KeyManagerFactory} based upon a key algorithm, key file, key file password,
and a certificate chain.

@param certChainFile a X.509 certificate chain file in PEM format
@param keyAlgorithm the standard name of the requested algorithm. See the Java Secure Socket
Extension
Reference Guide for information about standard algorithm names.
@param keyFile a PKCS#8 private key file in PEM format
@param keyPassword the password of the {@code keyFile}.
{@code null} if it's not password-protected.
@return A {@link KeyManagerFactory} based upon a key algorithm, key file, key file password,
and a certificate chain.
Build a { @link KeyManagerFactory } based upon a key algorithm key file key file password and a certificate chain .