зеркало из https://github.com/xamarin/mac-samples.git
Fixed 'HttpClient' FullProfile mode (#104)
This commit is contained in:
Родитель
3086da6df2
Коммит
c06d6622d5
|
@ -97,7 +97,7 @@ namespace HttpClient {
|
|||
try {
|
||||
ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
|
||||
|
||||
var request = new HttpWebRequest (new Uri ("https://howsmyssl.com:443/a/check"));
|
||||
var request = WebRequest.CreateHttp (new Uri ("https://howsmyssl.com:443/a/check"));
|
||||
ServicePointManager.ServerCertificateValidationCallback = delegate { return true; };
|
||||
var clientCertificate = new X509Certificate2 ("cert.pem");
|
||||
request.ClientCertificates.Add (clientCertificate);
|
||||
|
|
Загрузка…
Ссылка в новой задаче