protected KeyStore load(boolean isKeyStore) {
            try (InputStream in = Files.newInputStream(Paths.get(path))) {
                KeyStore ks = KeyStore.getInstance(type);
                // If a password is not set access to the truststore is still available, but integrity checking is disabled.
                char[] passwordChars = password != null ? password.value().toCharArray() : null;
                ks.load(in, passwordChars);
                return ks;
            } catch (GeneralSecurityException | IOException e) {
                throw new KafkaException("Failed to load SSL keystore " + path + " of type " + type, 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