差異處
這裏顯示兩個版本的差異處。
下次修改 | 前次修改 | ||
java:web:ssl:issuepersonalcertificate_keytool [2017/03/28 16:02] tony 建立 |
java:web:ssl:issuepersonalcertificate_keytool [2023/06/25 09:48] (目前版本) |
||
---|---|---|---|
行 2: | 行 2: | ||
====== Issue personal certificate with keytool ====== | ====== Issue personal certificate with keytool ====== | ||
===== Create a keystore ===== | ===== Create a keystore ===== | ||
+ | 產生名為test_keystore,10年有效期限的keystore: | ||
<code bash> | <code bash> | ||
@echo off | @echo off | ||
行 10: | 行 11: | ||
"%KEYTOOL%" -keystore "%KEYSTORE%" -alias %ALIAS% -genkey -keyalg RSA -validity 3650 | "%KEYTOOL%" -keystore "%KEYSTORE%" -alias %ALIAS% -genkey -keyalg RSA -validity 3650 | ||
</code> | </code> | ||
+ | 執行畫面如下:\\ | ||
+ | {{:java:web:ssl:keytool_gen_keystore.png|}} | ||
===== Check a keystore ===== | ===== Check a keystore ===== | ||
+ | 用來確認keystore的內容,我主要確認演算法與有效期間: | ||
<code bash> | <code bash> | ||
@echo off | @echo off | ||
行 18: | 行 22: | ||
"%KEYTOOL%" -list -v -keystore "%KEYSTORE%" | "%KEYTOOL%" -list -v -keystore "%KEYSTORE%" | ||
+ | |||
+ | pause | ||
</code> | </code> | ||
+ | 執行結果如下:\\ | ||
+ | {{:java:web:ssl:keytool_check_keystore.png|}} | ||
===== Reference ===== | ===== Reference ===== | ||
* [[https://wiki.eclipse.org/Jetty/Howto/Configure_SSL#Generating_Keys_and_Certificates_with_JDK_keytool|Jetty/Howto/Configure SSL]] | * [[https://wiki.eclipse.org/Jetty/Howto/Configure_SSL#Generating_Keys_and_Certificates_with_JDK_keytool|Jetty/Howto/Configure SSL]] | ||
* [[http://blog.csdn.net/tony1130/article/details/5134318|keytool常用參數]] | * [[http://blog.csdn.net/tony1130/article/details/5134318|keytool常用參數]] | ||
+ | * [[http://polinwei.blogspot.tw/2013/02/java-keytoolmicrosoft-active-directory.html|Java Keytool的使用及申請憑證]] | ||
* [[https://www.namecheap.com/support/knowledgebase/article.aspx/9650/38/i-can-see-sha1-fingerprintthumbprint-on-my-certificate-is-my-certificate-actually-sha2|i-can-see-sha1-fingerprintthumbprint-on-my-certificate-is-my-certificate-actually-sha2?]] 憑證指紋是要拿來確認檔案是否正確 | * [[https://www.namecheap.com/support/knowledgebase/article.aspx/9650/38/i-can-see-sha1-fingerprintthumbprint-on-my-certificate-is-my-certificate-actually-sha2|i-can-see-sha1-fingerprintthumbprint-on-my-certificate-is-my-certificate-actually-sha2?]] 憑證指紋是要拿來確認檔案是否正確 | ||
+ | * [[https://www.golinuxcloud.com/openssl-create-certificate-chain-linux/|openssl-create-certificate-chain-linux]] | ||