我正在开发一个使用由客户 CA 颁发的证书签名的小程序的 Web 应用程序。该证书包含指向未定义主机和端口的 CRL 分发点的 URL。证书属性“CRL Distribution Points”和“Authority Information Access”包含类似于“ldap:///CN=my-cn...”的 URL。
证书撤销检查 API (C:\Users[my_user]\AppData\LocalLow\Sun\Java\Deployment\log) 生成的日志文件表明值“localhost”和“389”正用于主机和端口. 这是日志文件的片段:
...
certpath: DistributionPointFetcher.getCRLs: Checking CRLDPs for CN=xxx, O=yyy, L=zzz, C=PT
certpath: Trying to fetch CRL from DP ldap:///CN=_my-cn_?certificateRevocationList?base?objectClass=cRLDistributionPoint
certpath: CertStore URI:ldap:///CN=_my-cn_?certificateRevocationList?base?objectClass=cRLDistributionPoint
...
network: Connecting http://localhost:389/ with proxy=DIRECT
...
certpath: LDAPCertStore.engineInit about to throw InvalidAlgorithmParameterException
javax.naming.CommunicationException: localhost:389 [Root exception is java.net.ConnectException: Connection refused: connect]
at com.sun.jndi.ldap.Connection.<init>(Unknown Source)
...
谁能确认主机是强制性的,否则使用默认值“localhost”?
我在 LDAP RFC ( http://www.ietf.org/rfc/rfc4516.txt ) 中读到,如果“主机”字段不存在,则客户端必须先验了解要联系的适当 LDAP 服务器。是否可以配置“主机”属性?
我正在使用 JRE 版本 1.7.0_45(内部版本 1.7.0_45-b18)。
谢谢, Telmo Simões