createCert要求指令
createCertRequest 指令會建立 PKCS10 憑證要求,並將它儲存在用戶端金鑰儲存庫中,以便使用 requestCertificate 指令行公用程式,將它傳送至憑證管理中心 (CA) 伺服器。
位置
從 profile_root/bin 目錄發出指令。
語法
指令語法如下:
createCertRequest.sh -keyStoreAlias<keystoreAlias> -subjectDN<subjectDN> -alias<certificateAlias> [options]createCertRequest.bat -keyStoreAlias<keystoreAlias> -subjectDN<subjectDN> -alias<certificateAlias> [options]createCertRequest.sh -keyStoreAlias<keystoreAlias> -subjectDN<subjectDN> -alias<certificateAlias> [options]createCertRequest -keyStoreAlias<keystoreAlias> -subjectDN<subjectDN> -alias<certificateAlias> [options]
必要的參數
下列必要參數與 createCertRequest 指令搭配使用:
- 指定金鑰儲存庫的名稱,該金鑰儲存庫位於新增 CA 簽章憑證之設定檔的 ssl.client.props 檔中。 這是受管理或未受管理環境的 ClientDefaultKeyStore 檔案名稱。
- 指定要用於 PKCS10 憑證申請的識別名稱 (DN)。 DN 必須至少包含 CN、O 及 C 欄位。
- 指定用來將 PKCS10 憑證要求憑證儲存在要求所指定金鑰儲存庫中的別名。附註: CA 簽章憑證會以相同的別名儲存,並在收到時取代憑證申請憑證。
選用性參數
createCertRequest 指令的可用選項如下:
- 指定金鑰大小的選項。 僅當在頻內建立 PKCS10 憑證申請時,此選項才有效。 有效值包括 512、1024 2048、4096 及 8192。 預設大小為 2048。
- 憑證有效性的時段。 時段是從現行日期開始測量。 僅當在頻內建立 PKCS10 憑證要求時,此選項才有效。 預設值為 365 天。
- 以分號區隔的主體替代名稱清單。 只有在頻內建立 PKCS10 憑證申請時,才會使用這個選項。
- 以分號區隔的金鑰用法字串清單。 僅當在頻內建立 PKCS10 憑證要求時,此選項才有效。
- 以分號區隔的延伸金鑰用法字串清單。 僅當在頻內建立 PKCS10 憑證要求時,此選項才有效。
- 置換預設追蹤檔的日誌檔。 依預設,追蹤會出現在
profiles/profile_name/log/caClient.log中。 FILE。 - 指定時, -trace 會啟用追蹤此元件除錯所需的追蹤規格。 依預設,追蹤會出現在
profiles/profile_name/log/caClient.log檔案中。 - 執行指令時,會導致置換現有追蹤檔的選項。
- 在主控台上抑制大部分訊息印出的選項。
- 列印用法陳述式的選項
- 列印用法陳述式的選項
使用情形
下列範例會針對可用來傳送至 CA 的用戶端建立 PKCS10 憑證要求:
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
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
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
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