当前位置:   article > 正文

kafka ssl证书_kafka客户端证书

kafka客户端证书

生成SSL证书

为了方便ca、服务器、客户端证书使用相同的密码:cnki1234

生成ca证书
keytool -genkeypair -keystore mycastore.jks -storepass cnki1234 -alias myca -validity 3650 -dname CN=ca,C=cn -ext bc:c

keytool -exportcert -keystore mycastore.jks -storepass cnki1234 -alias myca -rfc -file myca.cer

生成服务器证书
keytool -genkeypair -keystore server.keystore.jks -storepass cnki1234 -alias server -keypass cnki1234 -validity 3650 -dname CN=server,C=cn

keytool -certreq -keystore server.keystore.jks -storepass cnki1234 -alias server -keypass cnki1234 -file server.csr

keytool -gencert -keystore mycastore.jks -storepass cnki1234 -alias myca -keypass cnki1234 -validity 3650 -infile server.csr -outfile server.cer

keytool -importcert -keystore server.truststore.jks -storepass cnki1234 -alias myca -keypass cnki1234 -file myca.cer

keytool -importcert -keystore server.keystore.jks -storepass cnki1234 -alias myca -keypass cnki1234 -file myca.cer

keytool -importcert -keystore server.keystore.jks -storepass cnki1234 -alias server -keypass cnki1234 -file server.cer

生成客户端证书
keytool -genkeypair -keystore client1.keystore.jks -storepass cnki1234 -alias client1 -keypass cnki1234 -validity 3650 -dname CN=client1,C=cn

keytool -certreq -keystore client1.keystore.jks -storepass cnki1234 -alias client1 -keypass cnki1234 -file client1.csr

keytool -gencert -keystore mycastore.jks -storepass cnki1234 -alias myca -keypass cnki1234 -validity 3650 -infile client1.csr -outfile client1.cer

keytool -importcert -keystore client1.truststore.jks -storepass cnki1234 -alias myca -keypass cnki1234 -file myca.cer

keytool -importcert -keystore client1.keystore.jks -storepass cnki1234 -alias myca -keypass cnki1234 -file myca.cer

keytool -importcert -keystore client1.keystore.jks -storepass cnki1234 -alias client1 -keypass cnki1234 -file client1.cer

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/爱喝兽奶帝天荒/article/detail/983192
推荐阅读
相关标签
  

闽ICP备14008679号