【发布时间】:2011-06-19 14:42:23
【问题描述】:
如何从 WebConversation 或 WebRequest 对象的上下文中忽略 SSL 证书问题?我知道我可以创建一个接受所有证书的假 TrustManager,但是如何在 HttpUnit 上下文中设置它?
这是我得到的例外:
[Security:090508]Certificate chain received from my.domain.com - NUM.NUM.NUM.NUM was incomplete.,
[Security:090477]Certificate chain received from my.domain.com - NUM.NUM.NUM.NUM was not trusted causing SSL handshake failure.
我需要以某种方式将 SSLSocket 设置设置为 WebConversation 或 WebRequest 对象;查看 HttpUnit 的 JavaDocs 没有这样的方法或构造函数可以这样做。有没有办法可以将它包装在一些暴露了 SSLSocket 属性的对象中?
【问题讨论】: