SSL 详细信息:检查基本限制

问题描述
与基本限制有关的警告出现在服务器端。

故障排除
请注意,并非下面所有任务都需要完成。有些问题仅通过执行几项任务就可以解决。

快速链接

返回页首

什么是基本限制?

基本限制扩展用于确定证书的主体是否为 CA 以及经过该 CA 可能存在多深的认证路径。

BasicConstraints 包含两个字段:

  • CA
  • pathLenConstraint

CA 是布尔类型,只能为 true 或 false。pathLenConstraint 字段只有在 CA 设置为 TRUE 时才有意义。在此情况下,它给出有效认证路径中此证书之后可能跟随的非自签发中间证书的最大数目。如果在主体字段和签发者字段中出现的 DN 相同且不为空,则证书为自签发证书。(备注:认证路径中的最后一个证书不是中间证书,不在此限制范围内。通常,最后一个证书为结束实体证书,但它可以是 CA 证书。)pathLenConstraint 为零表示在有效的认证路径中只能再跟随一个证书。只要出现,pathLenConstraint 字段“必须”大于或等于零。对于 pathLenConstraint 不出现的情况,则不加限制。

在含有验证证书中数字签名所用公钥的所有 CA 证书中,BasicConstraints“必须”以关键扩展形式出现。在含有出于验证证书中数字签名以外目的专用公钥的 CA 证书中,它“可以”以关键或非关键扩展形式出现。此类 CA 证书包括两种证书,一种含有专门用于验证 CRL 上数字签名的公钥,另一种含有与证书登记协议一同使用的密钥管理公钥。在结束实体证书中,BasicConstraints“可以”以关键或非关键扩展形式出现。

返回页首

 

警告消息及需要采取的措施

<The certificate chain received from peer contained a V3 CA certificate which was missing the basic constraints extension>

“基本限制”用于识别 CA,因而,如果限制检查设置为 strong 或 strict 而 CA 缺少基本限制扩展,则您将得到此消息。可以禁用限制检查,或者获取一个有效 CA 或一个具有有效 CA 的证书链。请注意,禁用限制检查会对安全造成严重威胁,不提倡这样做。

<The certificate chain received from peer contained a V3 CA certificate which had basic constraints which were not marked critical, this is being rejected due to the strict enforcement of basic constraints>

当具有“基本限制”的 CA 证书未标记为 CRITICAL 且启用了严格基本限制检查时,便会出现此错误。可将限制检查设置为缺省值,也可获取一个基本限制设置为 CRITICAL 的正确证书。

<The certificate chain received from peer contained a V3 CA certificate which could not be converted to be checked for basic constraints>

Weblogic 服务器无法将证书链中的 CA 证书转换为可以进行基本限制检查的格式。如果证书链损坏,则需要更新证书链。但是,如果证书链完好,则说明问题出在 WebLogic Server 本身。另外,禁用限制检查也可以纠正该问题。请注意,禁用限制检查会对安全造成严重威胁,不提倡这样做。

<The certificate chain received from peer contained a V3 CA certificate which indicated a certificate chain path length in the basic constraints that was exceeded>

路径长度限制了链中跟在一个 CA 证书后面的 CA 证书数。可以更新证书链,也可禁用限制检查。请注意,禁用限制检查会对安全造成严重威胁,不提倡这样做。

返回页首

 

调试和故障排除

可以使用下列命令行属性启用 SSL 调试:

  • Dssl.debug=true
  • Dweblogic.StdoutDebugEnabled=true

这些属性可以包括在服务器、客户端或 Nodemanager 的启动脚本中。在命令提示中会打印输出大量信息,可以浏览这些信息,并可借此收集有关证书的信息。不过,如果证书是客户端发送过来的,则可以收集更为详细的信息。请务必注意,JAVA 应用程序使用 SSL 调试标志提供的信息并不指出 CA 是否包含“基本限制”。

---

---

---

---

####<Nov 3, 2004 9:31:54 PM IST> <Debug> <TLS> <THE-ONE> <myserver> <main> <kernel identity> <> <000000> <SSLManager.getServerCertificate()>
####<Nov 3, 2004 9:31:55 PM IST> <Info> <Security> <THE-ONE> <myserver> <main> <kernel identity> <> <090515> <The certificate chain could not be completely checked for issues which could cause it to be rejected by a peer during SSL handshaking, no action is required unless peers are rejecting the certificate chain.>
####<Nov 3, 2004 9:31:55 PM IST> <Debug> <TLS> <THE-ONE> <myserver> <main> <kernel identity> <> <000000> <Server identity successfully loaded>
####<Nov 3, 2004 9:31:55 PM IST> <Debug> <TLS> <THE-ONE> <myserver> <main> <kernel identity> <> <000000> <SSLManager, getting trusted CAs from cmd line keystore: F:\WLS\bea70sp4\weblogic615\server\lib\cacerts>
####<Nov 3, 2004 9:31:55 PM IST> <Debug> <TLS> <THE-ONE> <myserver> <main> <kernel identity> <> <000000> <Trusted CA: Serial number: 0
Issuer:C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Freemail CA, EMAIL=personal-freemail@thawte.com
Subject:C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Freemail CA, EMAIL=personal-freemail@thawte.com
Not Valid Before:Mon Jan 01 05:30:00 IST 1996
Not Valid After:Fri Jan 01 05:29:59 IST 2021
Signature Algorithm:MD5withRSA
>
####<Nov 3, 2004 9:31:55 PM IST> <Debug> <TLS> <THE-ONE> <myserver> <main> <kernel identity> <> <000000> <Trusted CA: Serial number: 0
Issuer:C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Basic CA, EMAIL=personal-basic@thawte.com
Subject:C=ZA, ST=Western Cape, L=Cape Town, O=Thawte Consulting, OU=Certification Services Division, CN=Thawte Personal Basic CA, EMAIL=personal-basic@thawte.com
Not Valid Before:Mon Jan 01 05:30:00 IST 1996
Not Valid After:Fri Jan 01 05:29:59 IST 2021
Signature Algorithm:MD5withRSA
>
####<Nov 3, 2004 9:31:55 PM IST> <Debug> <TLS> <THE-ONE> <myserver> <main> <kernel identity> <> <000000> <Trusted CA: Serial number: 69042098805081595651034369680212310004
Issuer:C=US, ST=MyState, L=MyTown, O=MyOrganization, OU=FOR TESTING ONLY, CN=CACERT
Subject:C=US, ST=MyState, L=MyTown, O=MyOrganization, OU=FOR TESTING ONLY, CN=CACERT
Not Valid Before:Fri Mar 22 01:42:27 IST 2002
Not Valid After:Wed Mar 23 01:42:27 IST 2022
Signature Algorithm:MD5withRSA
>
####<Nov 3, 2004 9:31:55 PM IST> <Debug> <TLS> <THE-ONE> <myserver> <main> <kernel identity> <> <000000> <Trusted CA: Serial number: 303889516662913207929516869807881060914
Issuer:C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority
Subject:C=US, O=VeriSign, Inc., OU=Class 3 Public Primary Certification Authority
Not Valid Before:Mon Jan 29 05:30:00 IST 1996
Not Valid After:Thu Jan 08 05:29:59 IST 2004
Signature Algorithm:MD2withRSA
>
####<Nov 3, 2004 9:31:55 PM IST> <Debug> <TLS> <THE-ONE> <myserver> <main> <kernel identity> <> <000000> <Trusted CA: Serial number: 0
Issuer:C=US, ST=California, L=San Francisco, O=BEA WebLogic, OU=Security, CN=Demo Certificate Authority Constraints, EMAIL=security@bea.com
Subject:C=US, ST=California, L=San Francisco, O=BEA WebLogic, OU=Security, CN=Demo Certificate Authority Constraints, EMAIL=security@bea.com
Not Valid Before:Sat Nov 02 01:32:11 IST 2002
Not Valid After:Tue Oct 17 01:32:11 IST 2006
Signature Algorithm:MD5withRSA
>

---

---

---

---

可以按照以下这些步骤查出 CA 是否具有基本限制:
  1. 打开 IE 浏览器
  2. 转至“工具”->“Internet 选项”
  3. 单击“内容”选项卡,然后单击“证书...”
  4. 转至“中间证书颁发机构”选项卡并打开任意 Verisign 或 Thwate 证书
  5. 转至“详细信息”选项卡并查出称为“基本限制”的字段

在某些浏览器中,如“Mozilla”,不会出现“基本限制”字段。但是,您可能会看到类似“Object Identifier(2 5 29 19)”的内容。不过,这与 IE 中的“基本限制”字段是相同的。

如果没有“基本限制”字段,则该 CA 证书缺少基本限制,使用此类 CA 证书将显示一条消息,内容为“The certificate chain received from peer contained a V3 CA certificate which was missing the basic constraints extension”

返回页首



控制证书验证
与 WebLogic Server 一起使用的所有 X509 V3 CA 证书均须将“基本限制”扩展定义为 CA,从而确保证书链中的所有证书都是由证书颁发机构签发的。缺省情况下,证书颁发机构的任何证书,如不满足此标准,均会被拒绝。但是,可以使用以下命令行参数来控制证书验证级别:

  • Dweblogic.security.SSL.enforceConstraints=option

下面是 -Dweblogic.security.SSL.enforceConstraints 的选项:

  • strong / true

此选项用于检查 CA 证书上的“基本限制”扩展是否定义为 CA。缺省情况下,会执行这个级别的验证。

  • strict

此选项用于检查 CA 证书上的“基本限制”扩展是否定义为 CA 且设置为 CRITICAL。

  • off

此选项会禁用限制检查。不提倡使用此选项(尤其是在“生产”服务器中),因为这会对安全造成威胁。

返回页首


   
需要更多帮助?
如果您已经理解这个模式,但仍需要更多帮助,您可以:
  1. http://support.bea.com/ 上查询 AskBEA(例如,使用“BasicConstraints”),以查找其它已发布的解决办法。技术支持合同客户:确保已经登录,可以访问提供的与 CR 有关的信息。
  2. http://newsgroups.bea.com/ 上,向 BEA 的某个新闻组提出更详细具体的问题。
如果这还不能解决您的问题,并且您拥有有效的技术支持合同,您可以通过登录以下网站来打开支持案例:http://support.bea.com/。

反馈

请给我们提供您的意见,说明此支持诊断模式“SSL 详细信息:检查基本限制”一文是否有所帮助,您需要的任何解释,以及对支持诊断模式的新主题的任何要求。


免责声明:

依据 BEA 与您签署的维护和支持协议条款,BEA Systems, Inc. 在本网站上提供技术技巧和补丁供您使用。虽然您可以将这些信息和代码与您获得 BEA 授权的软件一起使用,但 BEA 并不对所提供的技术技巧和补丁做任何形式的担保,无论是明确的还是隐含的。

本文档中引用的任何商标是其各自所有者的财产。有关完整的商标信息,请参考您的产品手册。