1:點擊扳手圖標,再點擊Settings
2:關閉SSL校驗
3:切到Certificates頁簽;添加客戶端校驗
注:
CRT file為客戶端密鑰庫的公鑰
KEY file為客戶端密鑰庫的私鑰
Passphrase為密鑰庫的密碼
4:生成PKCS12數字證書
打開cmd 1、生成私有秘鑰:(先創建目錄d:/temp/store/) 輸入keytool -genkey -v -alias root -keyalg RSA -storetype PKCS12 -keystore d:/temp/store/test.jks 輸入密鑰庫口令:123456;其它全部填空 2、根據私有密鑰生成公鑰 輸入keytool -export -alias root -keystore d:/temp/store/test.jks -storetype PKCS12 -storepass 123456 -rfc -file d:/temp/store/test.cer
5:將.jks格式的證書轉換為p12證書
keytool -importkeystore -srckeystore d:/temp/store/test.jks -srcstoretype JKS -deststoretype PKCS12 -destkeystore d:/temp/store/test.p12
6:用openssl對一個p12格式密鑰庫進行公鑰和私鑰的導出(生成pem格式證書,需要有p12證書):
先決條件:
從openssl官網下載www.openssl.org
安裝openssl[windows和linux安裝不同]
如果沒有配置環境變量,則需要進入openssl的bin目錄下執行命令,如:C:/OpenSSL/bin