当前位置:   article > 正文

postman 关闭ssl,该请求已中止:无法创建SSL / TLS安全通道,但可以在浏览器/ POSTMAN中使用...

postman could not create ssl

I am kind of at a lost here. Adding the ServicePointManager stuff usually fixes this but this time I keep getting the error below. My server can access the same URL from the browser and POSTMAN. But running this through the website fails. This works on my local computer though. I have TLS 1.1 and TLS 1.2 enabled on the server.

I am using CertifyTheWeb certificates, basically free SSL. Not sure if this has anything to do with it.

I am sending to the link below which is rejecting the request when made from the code below from IIS.

Message :The request was aborted: Could not create SSL/TLS secure

channel. Source :System Stack Trace : at

System.Net.HttpWebRequest.GetResponse() at

ServicePointManager.Expect100Continue = true;

ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls | SecurityProtocolType.Tls11 | SecurityProtocolType.Tls12 | SecurityProtocolType.Ssl3;

var webRequest = (HttpWebRequest) WebRequest.Create("https://www.nationalsportsid.com/tournament/" + nationalSportsId);

try

{

using (var webResponse = (HttpWebResponse) webRequest.GetResponse())

{

if (webResponse.StatusCode == HttpStatusCode.OK)

{

return true;

}

}

}

catch (WebException ex)

{

Logger.Error(ex);

}

Here is what Message Analyzer records

Handshake

7755632d9adbd9d3bbf7a17526146440.png

Alert

1932e5d9d0362320f9c7ae5b452d141f.png

解决方案

It was a configuration issue on the other server in Apache. They loosened their SSL configuration, which I am not sure what they did but their previous configuration is below. I can now make a HTTP request to their server.

SSLEngine on

# Intermediate configuration, tweak to your needs

SSLProtocol all -SSLv2 -SSLv3

SSLCipherSuite ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE$

SSLHonorCipherOrder on

SSLCompression off

SSLOptions +StrictRequire

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/爱喝兽奶帝天荒/article/detail/842266
推荐阅读
相关标签
  

闽ICP备14008679号