createCertRequest 命令
createCertRequest 命令创建 PKCS10 证书请求,并将其存储在客户机密钥库中,以便使其可以通过 requestCertificate 命令行实用程序发送到认证中心 (CA) 服务器。
位置
从 profile_root/bin 目录发出该命令。
语法
命令语法如下所示:
![[AIX]](../images/aixlogo.gif)
![[HP-UX]](../images/hpux.gif)
![[Linux]](../images/linux.gif)
![[Solaris]](../images/solaris.gif)
createCertRequest.sh -keyStoreAlias<keystoreAlias> -subjectDN<subjectDN> -alias<certificateAlias> [options]
![[Windows]](../images/windows.gif)
createCertRequest.bat -keyStoreAlias<keystoreAlias> -subjectDN<subjectDN> -alias<certificateAlias> [options]
![[z/OS]](../images/ngzos.gif)
createCertRequest.sh -keyStoreAlias<keystoreAlias> -subjectDN<subjectDN> -alias<certificateAlias> [options]
![[IBM i]](../images/iseries.gif)
createCertRequest -keyStoreAlias<keystoreAlias> -subjectDN<subjectDN> -alias<certificateAlias> [options]
必需参数
以下必需参数与 createCertRequest 命令配合使用:
- 指定位于概要文件的 ssl.client.props 文件中的密钥库(CA 签署的证书将添加至该密钥库中)名称。对于受管环境或非受管环境,此选项是 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 文件中。
- 当指定了 -trace 时,它启用对调试此组件所必需的跟踪规范的跟踪。缺省情况下,跟踪将显示在 profiles/profile_name/log/caClient.log 文件中。
- 此选项导致执行命令时替换现有跟踪文件。
- 此选项禁止在控制台上打印出大多数消息。
- 此选项可打印用法语句
- 此选项可打印用法语句
用法
以下示例为客户机创建了可用于发送到 CA 的 PKCS10 证书请求:
![[AIX]](../images/aixlogo.gif)
![[HP-UX]](../images/hpux.gif)
![[Linux]](../images/linux.gif)
![[Solaris]](../images/solaris.gif)
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]](../images/windows.gif)
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]](../images/ngzos.gif)
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]](../images/iseries.gif)
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