使用WinRT接受无效的SSL证书 [英] Accepting invalid SSL certificates using WinRT

查看:70
本文介绍了使用WinRT接受无效的SSL证书的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在某些情况下,您希望您的应用程序接受无效的SSL证书(测试环境/自签名证书等).

There are scenarios where you want your application to accept invalid SSL certificates (testing environment/ self signed certificates etc).

在.NET世界中,将使用ServerCertificateValidationCallback类来执行此操作.不幸的是,该类在WinRT上下文中不存在.

In the .NET world one would use the ServerCertificateValidationCallback class to do so. Unfortunately the class doesn't exist in a WinRT context.

我需要使用WinRT来使用Web API,该Web API托管在没有有效ssl证书的服务器上.

I need to consume a Web API using WinRT which is hosted on a server without a valid ssl certificate.

如何使用HttpClient类或任何其他适当的类在WinRT中接受无效的ssl证书.

How do you accept invalid ssl certificates in WinRT using the HttpClient class or any other appropriate class.

任何帮助或替代方案将不胜感激.

Any help or alternatives would much appreciated.

推荐答案

在Silverlight中是不允许的.我还没有看到任何说明它允许在winrt中使用的东西.

in silverlight, it wasn't allowed. I haven't seen anything that says it's allowed in winrt.

这篇关于使用WinRT接受无效的SSL证书的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆