We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
This:
import backports.ssl as ssl import socket context = ssl.SSLContext(ssl.PROTOCOL_SSLv23) context.verify_mode = ssl.CERT_REQUIRED conn = context.wrap_socket(socket.socket(socket.AF_INET)) conn.connect(('google.com', 443)) print(conn.getpeercert()) # modified for Python3 conn.close()
Results in:
Traceback (most recent call last): File "C:\Python34\lib\site-packages\backports\ssl\core.py", line 201, in _safe_ssl_call return getattr(sock, call)(*args, **kwargs) File "C:\Python34\lib\site-packages\OpenSSL\SSL.py", line 1442, in do_handshake self._raise_ssl_error(self._ssl, result) File "C:\Python34\lib\site-packages\OpenSSL\SSL.py", line 1187, in _raise_ssl_error _raise_current_error() File "C:\Python34\lib\site-packages\OpenSSL\_util.py", line 48, in exception_from_error_queue raise exception_type(errors) OpenSSL.SSL.Error: [('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')] During handling of the above exception, another exception occurred: Traceback (most recent call last): File "test_outlook_imap.py", line 8, in <module> conn.connect(('google.com', 443)) File "C:\Python34\lib\site-packages\backports\ssl\core.py", line 258, in connect self.do_handshake() File "C:\Python34\lib\site-packages\backports\ssl\core.py", li�ne 261, in do_handshake _safe_ssl_call(False, self._conn, 'do_handshake') File "C:\Python34\lib\site-packages\backports\ssl\core.py", line 222, in _safe_ssl_call raise SSLError(*e.args) backports.ssl.core.SSLError: [('SSL routines', 'ssl3_get_server_certificate', 'certificate verify failed')]
�
The text was updated successfully, but these errors were encountered:
No branches or pull requests
This:
Results in:
�
The text was updated successfully, but these errors were encountered: