Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
java lettuce redis client example using SSL
Download the CA and user certificates:
my_ca.pem
user.pem
user.key
Create p12 file, using the user.pem file and the private key file:
> openssl pkcs12 -export -in user.pem -inkey user.key -out user.p12
Create the jks file, using the pem file:
> keytool -import -alias sometest -file my_ca.pem -keystore keystore.jks
client.setOptions(ClientOptions.builder().sslOptions(SslOptions.builder()
.keystore(new File("user.p12"), "test12".toCharArray())
.truststore(new File("keystore.jks"), "keystorepassword12")
.build()).build());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment