queryCertificate 命令
queryCertificate 命令使用已传递的实现类,用于与认证中心 (CA) 服务器通信并查询证书。
queryCertificate 命令检查证书是否完成。 如果证书完成,那么 CA 证书将存储在客户机密钥库中。 如果证书未完成,那么证书请求将保留在密钥库中,并可在稍后某个时间调用 queryCertificate 命令来确定证书是否完成。
位置
从发出命令配置文件根/bin目录。
语法
命令语法如下。 (为了便于打印,命令拆分为多行。)
queryCertificate.sh -host<caHost> -port<caPort> -username<caUserName> -password<caPassword>
-alias<certificateAlias> -keystoreAlias<keystoreAlias>
-pkiImplClass<customCAClient>[options]queryCertificate.bat -host<caHost> -port<caPort> -username<caUserName> -password<caPassword>
-alias<certificateAlias> -keystoreAlias<keystoreAlias>
-pkiImplClass<customCAClient> [options]queryCertificate.sh -host<caHost> -port<caPort> -username<caUserName> -password<caPassword>
-alias<certificateAlias> -keystoreAlias<keystoreAlias>
-pkiImplClass<customCAClient>[options]queryCertificate -host<caHost> -port<caPort> -username<caUserName> -password<caPassword>
-alias<certificateAlias> -keystoreAlias<keystoreAlias>
-pkiImplClass<customCAClient>[options]
必需参数
以下必需参数与 queryCertifcate 命令配合使用:
- 指定请求将发送到的目标认证中心主机。
- 指定要连接的目标端口。
- 指定用于获取对认证中心访问权的用户名。
- 指定用于向认证中心认证的密码。
- 指定要查询的证书的别名。
- 指定位于概要文件的 ssl.client.props 文件中的密钥库(CA 签署的证书将添加至该密钥库中)名称。 对于受管环境或非受管环境,此名称是 ClientDefaultKeyStore 文件。
- 实现 WSPKIClient 接口的类。 实现类处理到 CA 服务器的所有通信。 这可以是定制类,或随产品提供的类。
可选参数
以下选项可用于 queryCertificate 命令:
- 以分号分隔的将传递到定制实现类的 custom name=value 对列表。 此参数提供了一种将定制信息传递到实现类的方式。 “attr”和“value”对将被转换为哈希映射并传递给实现类。
- 向 CA 服务器查询 CA 已签署证书的两次重试之间的时间段,以秒为单位。
- 向 CA 服务器重试查询请求的总次数。
- 覆盖缺省跟踪文件的日志文件。 默认情况下,跟踪显示在
profiles/profile_name/log/caClient.log。 中。 - 当指定了 -trace 时,它启用对调试此组件所必需的跟踪规范的跟踪。 缺省情况下,跟踪显示在
profiles/profile_name/log/caClient.log文件中。 - 此选项导致执行命令时替换现有跟踪文件。
- 此选项禁止在控制台上打印出大多数消息。
- 此选项可打印用法语句
使用情况
以下示例执行 queryCertificate:
queryCertificate.sh -host localhost -port 1077 -
username pkiuser -password webspherepki -alias C:\opt\WebSphere\AppClient\
etc\certReq26924.req -keyStoreAlias ClientDefaultKeyStore
CWPKI0403I: Trace is being logged to the following location:
C:\opt\WebSphere\AppClient\logs\caClient.log
CWPKI0418E: The following error occurred while querying the CA for a signed
certificate: CWPKI0463I: Action "query" not supported by this
implementation.
C:\opt\WebSphere\AppClient\bin>queryCertificate.bat -host localhost -port 1077 -
username pkiuser -password webspherepki -alias C:\opt\WebSphere\AppClient\
etc\certReq26924.req -keyStoreAlias ClientDefaultKeyStore
CWPKI0403I: Trace is being logged to the following location:
C:\opt\WebSphere\AppClient\logs\caClient.log
CWPKI0418E: The following error occurred while querying the CA for a signed
certificate: CWPKI0463I: Action "query" not supported by this
implementation.
queryCertificate.sh -host localhost -port 1077 -
username pkiuser -password webspherepki -alias C:\opt\WebSphere\AppClient\
etc\certReq26924.req -keyStoreAlias ClientDefaultKeyStore
CWPKI0403I: Trace is being logged to the following location:
C:\opt\WebSphere\AppClient\logs\caClient.log
CWPKI0418E: The following error occurred while querying the CA for a signed
certificate: CWPKI0463I: Action "query" not supported by this
implementation.
queryCertificate -host localhost -port 1077 -
username pkiuser -password webspherepki -alias C:\opt\WebSphere\AppClient\
etc\certReq26924.req -keyStoreAlias ClientDefaultKeyStore
CWPKI0403I: Trace is being logged to the following location:
C:\opt\WebSphere\AppClient\logs\caClient.log
CWPKI0418E: The following error occurred while querying the CA for a signed
certificate: CWPKI0463I: Action "query" not supported by this
implementation.