Java keytool 安全证书学习笔记
参数说明:?
-genkey表示要创建一个新的密钥?
-dname表示密钥的Distinguished Names,?
??????? CN=commonName?
??????? OU=organizationUnit?
??????? O=organizationName?
??????? L=localityName?
??????? S=stateName?
??????? C=country?
Distinguished Names表明了密钥的发行者身份?
-keyalg使用加密的算法,这里是RSA?
-alias密钥的别名?
-keypass私有密钥的密码,这里设置为kpi135?
-keystore 密钥保存在C:\working目录下的mykeystore文件中?
-storepass 存取密码,这里设置为ab987c,这个密码提供系统从mykeystore文件中将信息取出?
-validity该密钥的有效期为 180天?
cacerts证书文件(The cacerts Certificates File)?
改证书文件存在于java.home\lib\security目录下,是Java系统的CA证书仓库?
CA证书的导入(Importing Certificates)?
命令:引用keytool -import -alias joe -file jcertfile.cer
这个命令将证书文件jcertfile.cer中别名为joe的证书导入系统的受信任证书列表中?
通常该命令用以导入来自CA中心的证书(Importing a Certificate for the CA)?
导入被CA中心授权的证书(Importing the Certificate Reply from the CA)?
命令:引用keytool -import -trustcacerts -file VSMarkJ.cer
证书的导出(Exporting Certificates)?
命令:引用keytool -export -alias jane -file janecertfile.cer
这个命令将别名为jane的证书导出到证书文件jcertfile.cer中?
生成的证书可以交付客户端用户使用,用以进行SSL通讯,或者伴随电子签名的jar包进行发布者的身份认证。?
参考资料:Key and Certificate Management Tool
?