export
JAVA_HOME=/usr/java/jdk1.6.0_11
export JAVA_HOME=/usr/java/jre1.6.0_07
$JAVA_HOME/bin/keytool -genkey -alias localhost -keyalg RSA
-validity 1095 -keystore /www/keystore.jks
$JAVA_HOME/bin/keytool -certreq -alias localhost -sigalg MD5withRSA
-file /www/server.csr -keystore /www/keystore.jks
导入证书
$JAVA_HOME/bin/keytool -import -v -trustcacerts -storepass changeit
-alias my1_ca_root -file /www/root.cer -keystore
/usr/java/jdk1.6.0_11/jre/lib/security/cacerts
$JAVA_HOME/bin/keytool -import -v -trustcacerts -storepass changeit
-alias my2_ca_root -file /www/class1.cer -keystore
/usr/java/jdk1.6.0_11/jre/lib/security/cacerts
$JAVA_HOME/bin/keytool -import -v -trustcacerts -storepass changeit
-alias my3_ca_root -file /www/class2.cer -keystore
/usr/java/jdk1.6.0_11/jre/lib/security/cacerts
$JAVA_HOME/bin/keytool -import -v -trustcacerts -storepass changeit
-alias my4_ca_root -file /www/class3.cer -keystore
/usr/java/jdk1.6.0_11/jre/lib/security/cacerts
把CTCA签名后的server端证书导入keystore
$JAVA_HOME/bin/keytool -import -v -trustcacerts -storepass ct10000
-alias jboss1_server -file /www/SERVER.PEM -keystore
/www/keystore.jks
查看server端证书
$JAVA_HOME/bin/keytool -list -keystore
/usr/java/jdk1.6.0_11/jre/lib/security/cacerts
$JAVA_HOME/bin/keytool -list -keystore
/www/keystore.jks