-
-
Save karussell/de87412e09722cf05fc64be59dac924b to your computer and use it in GitHub Desktop.
java lettuce redis client example using SSL
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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