private KeyStore createKeyStoreFromPem(String privateKeyPem, String certChainPem, char[] keyPassword) {
            try {
                KeyStore ks = KeyStore.getInstance("PKCS12");
                ks.load(null, null);
                Key key = privateKey(privateKeyPem, keyPassword);
                Certificate[] certChain = certs(certChainPem);
                ks.setKeyEntry("kafka", key, keyPassword, certChain);
                return ks;
            } catch (Exception e) {
                throw new InvalidConfigurationException("Invalid PEM keystore configs", e);
            }
        }
Loads this keystore
@return the keystore
@throws KafkaException if the file could not be read or if the keystore could not be loaded
  using the specified configs (e.g. if the password or keystore type is invalid)
clients/src/main/java/org/apache/kafka/common/security/ssl/DefaultSslEngineFactory.java