[英]Java code signing certificate issue
我生成一個證書簽名請求,如下所示:
keytool -genkey -alias server -keyalg RSA -keysize 2048 -keystore xxxx -dname "CN=www.example.com,OU=Infrastructure and Operations, O=ACME, Inc., L=Test, ST=Test, C=US" && keytool -certreq -alias server -file xxxx.csr -keystore xxxx.jks
創建代碼簽名證書時,由於某種原因,CN被設置為組織值而不是FQDN,我最初列出的是www.example.com
因此證書有CN=ACME, Inc.
,OU=Infrastructure and Operations, O=ACME, Inc., L=Test, ST=Test, C=US
不知道為什么它沒有采用FQDN。
Oracle文檔說:
如果可分辨名稱字符串值包含逗號,則在命令行上指定字符串時,必須使用
"\\"
字符對逗號進行轉義,如
cn=peter schuster, o=Sun Microsystems\\, Inc., o=sun, c=us
所以有效的dname是:
"CN=www.example.com,OU=Infrastructure and Operations, O=ACME\, Inc., L=Test, ST=Test, C=US"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.