Created
August 20, 2010 00:29
-
-
Save kimsterv/539295 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
http://download.oracle.com/javase/6/docs/technotes/guides/security/jsse/JSSERefGuide.html#CreateKeystore | |
Make the keystore: | |
keytool -genkeypair -alias sg -keyalg RSA -validity 7 -keystore keystore | |
Take a look at it: | |
keytool -list -v -keystore keystore | |
Sign it (makes it into a .cer): | |
keytool -export -alias sg -keystore keystore -rfc -file sgflume.cer | |
Check it out!: | |
cat sgflume.cer | |
Import the certificate into a new truststore (this is where it gets good!): | |
keytool -import -alias sgflumecert -file sgflume.cer -keystore truststore | |
"Examine the truststore": keytool -list -v -keystore truststore | |
Set the options: | |
Special JOPTS | |
JOPTS+="-Djavax.net.ssl.keyStore=/home/kim/code/flume/conf/keystore " | |
JOPTS+="-Djavax.net.ssl.keyStorePassword=password " | |
JOPTS+="-Djavax.net.ssl.trustStore=/home/kim/code/flume/conf/truststore " | |
JOPTS+="-Djavax.net.ssl.trustStorePassword=trustword " | |
(*note the space before the last '"' in the JOPTS above) | |
(** JOPTS assume you create the keystore and truststore in flume/conf) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment