public static Map<String, Object> createSslConfig(String keyManagerAlgorithm, String trustManagerAlgorithm, String tlsProtocol) {
        Map<String, Object> sslConfigs = new HashMap<>();
        sslConfigs.put(SslConfigs.SSL_PROTOCOL_CONFIG, tlsProtocol); // protocol to create SSLContext

        sslConfigs.put(SslConfigs.SSL_KEYMANAGER_ALGORITHM_CONFIG, keyManagerAlgorithm);
        sslConfigs.put(SslConfigs.SSL_TRUSTMANAGER_ALGORITHM_CONFIG, trustManagerAlgorithm);

        List<String> enabledProtocols  = new ArrayList<>();
        enabledProtocols.add(tlsProtocol);
        sslConfigs.put(SslConfigs.SSL_ENABLED_PROTOCOLS_CONFIG, enabledProtocols);

        return sslConfigs;
    }
Creates a keystore with a single key and saves it to a file.

@param filename String file to save
@param password String store password to set on keystore
@param keyPassword String key password to set on key
@param alias String alias to use for the key
@param privateKey Key to save in keystore
@param cert Certificate to use as certificate chain associated to key
@throws GeneralSecurityException for any error with the security APIs
@throws IOException if there is an I/O error saving the file
clients/src/test/java/org/apache/kafka/test/TestSslUtils.java