示例:使用缺省 IbmPKIX 信任管理器启用证书撤销检查
缺省情况下,IbmPKIX 信任管理器在 WebSphere® Application Server 中启用。IbmPKIX 信任管理器允许进行证书撤销检查。启用证书撤销检查的方法是使用管理控制台或手动更新 ssl.client.props 文件。
缺省 IbmPKIX 信任管理器
缺省情况下启用了 IbmPKIX 信任管理器,但在缺省情况下未启用撤销检查。以下 IbmPKIX 的信任管理器定义反映了缺省情况:
<trustManagers xmi:id="TrustManager_managementNode_2" name="IbmPKIX" provider=
"IBMJSSE2" algorithm="IbmPKIX" trustManagerClass=""
managementScope="ManagementScope_managementNode_1">
<additionalTrustManagerAttrs xmi:id="DescriptiveProperty_1" name="com.ibm.se
curity.enableCRLDP" value="false" type="boolean" displayNameKey="" nlsRangeKey="
" hoverHelpKey="" range="" inclusive="false" firstClass="false"/>
<additionalTrustManagerAttrs xmi:id="DescriptiveProperty_2" name="com.ibm.js
se2.checkRevocation" value="false" type="boolean" displayNameKey="" nlsRangeKey=
"" hoverHelpKey="" range="" inclusive="false" firstClass="false"/>
<additionalTrustManagerAttrs xmi:id="DescriptiveProperty_3" name="ocsp.enable
e" value="false" type="String" displayNameKey="" nlsRangeKey="" hoverHelpKey=""
range="" inclusive="false" firstClass="false"/>
<additionalTrustManagerAttrs xmi:id="DescriptiveProperty_4" name="ocsp.respo
nderURL" value="http://ocsp.example.net:80" type="String" displayNameKey=""
nlsRangeKey="" hoverHelpKey="" range="" inclusive="false" firstClass="false"/>
<additionalTrustManagerAttrs xmi:id="DescriptiveProperty_5" name="ocsp.respo
nderCertSubjectName" value="" type="String" displayNameKey="" nlsRangeKey="" hov
erHelpKey="" range="" inclusive="false" firstClass="false"/>
<additionalTrustManagerAttrs xmi:id="DescriptiveProperty_6" name="ocsp.respo
nderCertIssuerName" value="" type="String" displayNameKey="" nlsRangeKey="" hove
rHelpKey="" range="" inclusive="false" firstClass="false"/>
<additionalTrustManagerAttrs xmi:id="DescriptiveProperty_7" name="ocsp.respo
nderCertSerialNumber" value="" type="String" displayNameKey="" nlsRangeKey="" ho
verHelpKey="" range="" inclusive="false" firstClass="false"/>
</trustManagers>
使用缺省 IbmPKIX 信任管理器启用证书撤销检查
可以使用管理控制台查看及更改 IbmPKIX 信任管理器定制属性。
要执行此操作:
- 单击安全性 > SSL 证书和密钥管理。
- 在“相关项”下面,单击信任管理器。
- 单击 IbmPKIX。
- 在“其他属性”下面,单击定制属性。
IbmPKIX 定制属性
- com.ibm.jsse2.checkRevocation
- 此属性配置 Java™ 虚拟机 (JVM) 的撤销检查。缺省情况下此属性设置为 false,因为用于 SSL 通信的缺省 WebSphere 证书不包含证书撤销列表 (CRL) 分发点或在线证书状态协议 (OCSP) 信息。注: 由于此属性为 JVM 属性,因此该值将对整个应用程序服务器生效。如果此属性是在不同范围的信任管理器中定义的,那么将从范围限定最明确的 IbmPKIX 信任管理器中使用生效的值。例如,在节点级别定义的 IbmPKIX 信任管理器属性将覆盖在单元级别定义的 IbmPKIX 信任管理器属性。对于 IbmX509 信任管理器,将忽略此属性。
- 缺省值
- False
- com.ibm.security.enableCRLDP
- 此属性配置 PKIX 信任管理器的 CRL 分发点检查。注: 如果启用 CRL 分发点撤销检查,用于安全套接字层 (SSL) 的证书必须包含有效的分发点,并且该分发点必须可访问,否则 SSL 通信将失败,并且服务器将无法正常运行。
- 缺省值
- False
对于不包含内部 CRL 分发点的证书,可以使用以下属性以便将对包含 CRL 的 远程 LDAP 服务器检查撤销状态。
- com.ibm.security.ldap.certstore.host
- 此属性指定包含可信证书或证书撤销列表的 LDAP 服务器主机名。验证证书时,如果本地信任库不包含所需证书,目标 LDAP 服务器主机将用于获取 CA 证书或证书撤销列表。如果未指定 LDAP 服务器,那么本地信任库必须包含所需证书。使用 LDAP 服务器时,根 CA 证书也必须位于本地信任库中,因为 LDAP 服务器不是可信证书库。注: 启用此属性(除 com.ibm.jsse2.checkRevocation 属性以外)可启用撤销检查。远程 LDAP 服务器必须包含有效的证书撤销列表,并且该服务器必须可访问。如果撤销状态无法确定,那么检查将失败,并且 SSL 通信将失败,服务器也将无法正常工作。
- 缺省值
- none
- com.ibm.security.ldap.certstore.port
- 此属性指定 LDAP 服务器端口。缺省情况下,如果未指定 LDAP 服务器端口,那么将使用端口值 389。
- 缺省值
- 389
- ocsp.enable
- ocsp.responder
- ocsp.responderCertSubjectName
- ocsp.responderCertIssuerName
- ocsp.responderCertSerialNumber
注: IbmPKIX 信任管理器除了具有标准证书验证功能以外,还可以检查包含 CRL 分发点的证书。此过程称为扩展 CRL 检查。缺省情况下,已禁用 CRL 分发点撤销检查。要启用 CRL 分发点撤销检查,必须使用管理控制台将以下属性设置为 true:
- com.ibm.security.enableCRLDP
- com.ibm.jsse2.checkRevocation
OCSP 属性和 CRL 属性影响证书撤销检查。缺省情况下,将首先检查 OCSP 属性。如果使用 OCSP 验证证书时发生错误,那么验证将改为使用 CRL 分发点。
当选择信任管理器时,会自动将它的相关属性设置为 Java 系统属性,以便使 IBMCertPath 和 IBMJSSE2 提供程序知道 CRL 检查已启用或禁用。与此类似,相同的情况适用于 OCSP 属性,即 java.security.Security 属性。
客户机注意事项
还可以通过直接设置 ssl.client.props 文件中的属性来为 WebSphere 应用程序和管理客户机启用撤销检查。ssl.client.props 文件的示例如下所示:
#-------------------------------------------------------------------------
# Default Revocation Checking Properties
# These properties are used for certificate revocation checking with the IBM
# PKIX TrustManager.
#
# To enable CRL Distribution Points extension checking, use the system property
# com.ibm.security.enableCRLDP.
#
# OCSP checking is not enabled by default. It is enabled by setting the
# ocsp.enable property to "true". Use of the other ocsp properties is optional.
#
# Note: Both OCSP and CRLDP checking is only effective if revocation checking
# has also been enabled by setting com.ibm.jsse2.checkRevocation to "true".
#
#-------------------------------------------------------------------------
com.ibm.jsse2.checkRevocation=false
com.ibm.security.enableCRLDP=false
#ocsp.enable=true
#ocsp.responderURL=http://ocsp.example.net
#ocsp.responderCertSubjectName=CN=OCSP Responder, O=XYZ Corp
#ocsp.responderCertIssuerName=CN=Enterprise CA, O=XYZ Corp
#ocsp.responderCertSerialNumber=2A:FF:00
注: 为使这些属性有效,必须通过设置 com.ibm.ssl.trustManager=IbmPKIX,确保 IbmPKIX 信任管理器已初始化。
此外,要使撤销检查能在客户机上成功处理,您需要关闭签署者交换提示。要执行此操作,请在 ssl.client.props 文件中将 com.ibm.ssl.enableSignerExchangePrompt 属性的值更改为 false。