问题描述
我正在尝试在 windows8 消费者预览版的 ssl 套接字中使用自签名证书.我收到此异常:
I am trying to use a self-signed certificate in a ssl socket on windows8 consumer preview. I am getting this exception:
异常:System.Runtime.InteropServices.COMException (0x800B0109):证书链已处理,但在不受信任提供者信任的根证书中终止.(来自 HRESULT 的异常:0x800B0109.
是否可以覆盖 ssl 证书的验证?像 remotecertificatevalidationcallback 之类的东西,它似乎没有可以在 windows8 上访问.
Is it possible to override the validation of ssl certificate ? Something like remotecertificatevalidationcallback , which does not seem to be accessible on windows8.
非常感谢.
推荐答案
在 Silverlight(具有非常相似的安全模型)中,无法解决连接中的 SSL 错误.在我的案例中,唯一的解决方法是使用服务器端代理隐藏 SSL 错误.
In Silverlight (which has a very similar security model), there is no way to go around a SSL error in a connection. The only workaround in my case was a server side proxy hiding the SSL errors.
我怀疑您是否会找到一种在 Win8 的沙箱(与 Silverlight 中相同)中进行不安全连接的方法.
I doubt that you'll find a way to do insecure connections in Win8's sandbox (same as in Silverlight).
这篇关于在 windows8 中覆盖证书验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!