createCert要求指令

createCertRequest 指令會建立 PKCS10 憑證要求,並將它儲存在用戶端金鑰儲存庫中,以便使用 requestCertificate 指令行公用程式,將它傳送至憑證管理中心 (CA) 伺服器。

位置

profile_root/bin 目錄發出指令。

語法

指令語法如下:

[Linux][AIX][HP-UX][Solaris]
createCertRequest.sh -keyStoreAlias<keystoreAlias> -subjectDN<subjectDN> -alias<certificateAlias> [options]
[Windows]
createCertRequest.bat -keyStoreAlias<keystoreAlias> -subjectDN<subjectDN> -alias<certificateAlias> [options]
[z/OS]
createCertRequest.sh -keyStoreAlias<keystoreAlias> -subjectDN<subjectDN> -alias<certificateAlias> [options]
[IBM i]
createCertRequest -keyStoreAlias<keystoreAlias> -subjectDN<subjectDN> -alias<certificateAlias> [options]

必要的參數

下列必要參數與 createCertRequest 指令搭配使用:
-keyStoreAlias keyStore別名
指定金鑰儲存庫的名稱,該金鑰儲存庫位於新增 CA 簽章憑證之設定檔的 ssl.client.props 檔中。 這是受管理或未受管理環境的 ClientDefaultKeyStore 檔案名稱。
-subjectDN subjectDN
指定要用於 PKCS10 憑證申請的識別名稱 (DN)。 DN 必須至少包含 CN、O 及 C 欄位。
-alias certificateAlias
指定用來將 PKCS10 憑證要求憑證儲存在要求所指定金鑰儲存庫中的別名。
附註: CA 簽章憑證會以相同的別名儲存,並在收到時取代憑證申請憑證。

選用性參數

createCertRequest 指令的可用選項如下:

-keySize 金鑰大小
指定金鑰大小的選項。 僅當在頻內建立 PKCS10 憑證申請時,此選項才有效。 有效值包括 512、1024 2048、4096 及 8192。 預設大小為 2048。
-certValidity 有效天數
憑證有效性的時段。 時段是從現行日期開始測量。 僅當在頻內建立 PKCS10 憑證要求時,此選項才有效。 預設值為 365 天。
-subjectAltNames altName1;altName2;...
以分號區隔的主體替代名稱清單。 只有在頻內建立 PKCS10 憑證申請時,才會使用這個選項。
-keyUsage keyUse1;keyUse2;...
以分號區隔的金鑰用法字串清單。 僅當在頻內建立 PKCS10 憑證要求時,此選項才有效。
-extKeyUsage extKeyUse1;extKeyUse2;...
以分號區隔的延伸金鑰用法字串清單。 僅當在頻內建立 PKCS10 憑證要求時,此選項才有效。
-logfile 檔名
置換預設追蹤檔的日誌檔。 依預設,追蹤會出現在 profiles/profile_name/log/caClient.log中。 FILE。
-trace
指定時, -trace 會啟用追蹤此元件除錯所需的追蹤規格。 依預設,追蹤會出現在 profiles/profile_name/log/caClient.log 檔案中。
-replaceLog
執行指令時,會導致置換現有追蹤檔的選項。
-quiet
在主控台上抑制大部分訊息印出的選項。
-help
列印用法陳述式的選項
-?
列印用法陳述式的選項

使用情形

下列範例會針對可用來傳送至 CA 的用戶端建立 PKCS10 憑證要求:

[Linux][AIX][HP-UX][Solaris]
createCertRequest.sh -keyStoreAlias ClientDefaultKeyStore -subjectDN CN=mycn,o=ibm,c=us -alias cert1
CWPKI0403I: Trace is being logged to the following location:
           C:\opt\WebSphere\AppClient\logs\caClient.log
CWPKI0422I: Generating a PKCS10 certificate request
CWPKI0421I: A PKCS10 certificate was successfully created.  The request
				is stored in file:
				C:\opt\WebSphere\AppClient\etc\certReq26924.req  
[Windows]
C:\opt\WebSphere\AppClient\bin>createCertRequest.bat -keyStoreAlias ClientDefaultKeyStore 
-subjectDN CN=mycn,o=ibm,c=us -alias cert1
CWPKI0403I: Trace is being logged to the following location:
           C:\opt\WebSphere\AppClient\logs\caClient.log
CWPKI0422I: Generating a PKCS10 certificate request
CWPKI0421I: A PKCS10 certificate was successfully created.  The request
				is stored in file:
				C:\opt\WebSphere\AppClient\etc\certReq26924.req  
[z/OS]
createCertRequest.sh -keyStoreAlias ClientDefaultKeyStore -subjectDN CN=mycn,o=ibm,c=us -alias cert1
CWPKI0403I: Trace is being logged to the following location:
           C:\opt\WebSphere\AppClient\logs\caClient.log
CWPKI0422I: Generating a PKCS10 certificate request
CWPKI0421I: A PKCS10 certificate was successfully created.  The request
				is stored in file:
				C:\opt\WebSphere\AppClient\etc\certReq26924.req  
[IBM i]
createCertRequest -keyStoreAlias ClientDefaultKeyStore -subjectDN CN=mycn,o=ibm,c=us -alias cert1
CWPKI0403I: Trace is being logged to the following location:
           C:\opt\WebSphere\AppClient\logs\caClient.log
CWPKI0422I: Generating a PKCS10 certificate request
CWPKI0421I: A PKCS10 certificate was successfully created.  The request
				is stored in file:
				C:\opt\WebSphere\AppClient\etc\certReq26924.req