pl.allegro.tech.hermes.common.ssl.jvm.JvmKeyManagersProvider Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of hermes-common Show documentation
Show all versions of hermes-common Show documentation
Fast and reliable message broker built on top of Kafka.
package pl.allegro.tech.hermes.common.ssl.jvm;
import pl.allegro.tech.hermes.common.ssl.KeyManagersProvider;
import javax.net.ssl.KeyManager;
import javax.net.ssl.KeyManagerFactory;
public class JvmKeyManagersProvider implements KeyManagersProvider {
@Override
public KeyManager[] getKeyManagers() throws Exception {
KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());
keyManagerFactory.init(null, null);
return keyManagerFactory.getKeyManagers();
}
}