CertificateError:主机名不匹配

编程入门 行业动态 更新时间:2024-10-19 16:24:56
本文介绍了CertificateError:主机名不匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在使用代理服务器(位于公司防火墙后)登录到https域. SSL握手似乎不太顺利:

I'm using a proxy (behind corporate firewall), to login to an https domain. The SSL handshake doesn't seem to be going well:

CertificateError: hostname 'ats.finra:443' doesn't match 'ats.finra'

我正在使用Python 2.7.9-Mechanize,并且已经超越了所有的登录名,密码,安全问题屏幕,但是它却挂在了证书上.

I'm using Python 2.7.9 - Mechanize and I've gotten past all of the login, password, security questioon screens, but it is getting hung up on the certification.

任何帮助都将是惊人的.我尝试了在这里找到的Monkeywrench:强制机械化以使用SSLv3

Any help would be amazing. I've tried the monkeywrench found here: Forcing Mechanize to use SSLv3

虽然不适用于我的代码.

Doesn't work for my code though.

如果您想要代码文件,我很乐意发送.

If you want the code file I'd be happy to send.

推荐答案

您可以通过猴子修补ssl来避免此错误:

You can avoid this error by monkey patching ssl:

import ssl ssl.match_hostname = lambda cert, hostname: True

更多推荐

CertificateError:主机名不匹配

本文发布于:2023-11-23 20:43:29,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1622810.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:不匹配   主机名   CertificateError

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!