简体   繁体   English

Python3 exchangelib连接错误:_ssl.c:749?

[英]Python3 exchangelib connect error: _ssl.c:749?

Python3 exchangelib connect error: _ssl.c:749? Python3 exchangelib连接错误:_ssl.c:749?

I am trying to connect to my company's Exchange server with exchangelib. 我正在尝试使用exchangelib连接到我公司的Exchange服务器。 I want to see all the mails I have received on MS Exchange / OWA. 我想查看我在MS Exchange / OWA上收到的所有邮件。

When I run the code below, I get: 当我运行下面的代码时,我得到:

  File "C:\Program Files\Python36\lib\site-packages\urllib3\connectionpool.py", line 601, in urlopen
    chunked=chunked)
  File "C:\Program Files\Python36\lib\site-packages\urllib3\connectionpool.py", line 346, in _make_request
    self._validate_conn(conn)
  File "C:\Program Files\Python36\lib\site-packages\urllib3\connectionpool.py", line 850, in _validate_conn
    conn.connect()
  File "C:\Program Files\Python36\lib\site-packages\urllib3\connection.py", line 326, in connect
    ssl_context=context)
  File "C:\Program Files\Python36\lib\site-packages\urllib3\util\ssl_.py", line 329, in ssl_wrap_socket
    return context.wrap_socket(sock, server_hostname=server_hostname)
  File "C:\Program Files\Python36\lib\ssl.py", line 401, in wrap_socket
    _context=self, _session=session)
  File "C:\Program Files\Python36\lib\ssl.py", line 808, in __init__
    self.do_handshake()
  File "C:\Program Files\Python36\lib\ssl.py", line 1061, in do_handshake
    self._sslobj.do_handshake()
  File "C:\Program Files\Python36\lib\ssl.py", line 683, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749)






from exchangelib import DELEGATE, Account, Credentials,NTLM,Configuration,Version,Build
creds = Credentials(username = 'inter.com\\login',password='password')
config = Configuration(service_endpoint='https://alpha.com/EWS/Exchange.asmx',credentials=creds,auth_type=NTLM)
account = Account(primary_smtp_address='login@alpha.com',config=config,autodiscover=False,access_type=DELEGATE,verify_ssl=False)
from exchangelib.protocol import BaseProtocol, NoVerifyHTTPAdapter
BaseProtocol.HTTP_ADAPTER_CLS = NoVerifyHTTPAdapter

Can you please let me know how to use certificates with exchangelib? 您能否让我知道如何在exchangelib中使用证书?

How to fix it? 如何解决?

Thanks for your help! 谢谢你的帮助!

Have you tried disabling ssl verification in your config ? 您是否尝试过在配置中禁用SSL验证?

config = Configuration(service_endpoint ='...', credentials=credentials, auth_type=NTLM, verify_ssl=False)

The sources seem to talk about a parameter like this. 消息来源似乎在谈论这样的参数。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Mac OSX python ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败 (_ssl.c:749) - Mac OSX python ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) Python Pip安装SSL错误749 - Python Pip Install SSL Error 749 ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败 (_ssl.c:749) - ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) Qlik sense ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] 证书验证失败 (_ssl.c:749) - Qlik sense ssl.SSLError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:749) Mysql 连接器 python 错误违反协议 (_ssl.c:2483) - Mysql connector python error violation of protocol (_ssl.c:2483) 错误urllib2 Python。 SSL:TLSV1_ALERT_INTERNAL_ERROR ssl.c:590 - Error urllib2 Python. SSL: TLSV1_ALERT_INTERNAL_ERROR ssl.c:590 Python 3.4 SSL error urlopen error EOF发生违反协议(_ssl.c:600) - Python 3.4 SSL error urlopen error EOF occurred in violation of protocol (_ssl.c:600) python中的握手失败(_ssl.c:590) - HandShake Failure in python(_ssl.c:590) https://s3.zoneame.amazonaws.com/ 的 SSL 验证失败 [SSL: CERTIFICATE_ VERIFY_FAILED] 证书验证失败 (_ssl.c:749) - SSL validation failed for https://s3.zoneame.amazonaws.com/ [SSL: CERTIFICATE_ VERIFY_FAILED] certificate verify failed (_ssl.c:749) 验证证书时出现python [SSL] PEM lib(_ssl.c:3309)错误 - python [SSL] PEM lib (_ssl.c:3309) error when verifying certificate
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM