You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
self-signed.pythontest.net TLS certificate key is too weak #80997
Traceback (most recent call last):
File "/home/greg/oss/cpython/Lib/test/test_httplib.py", line 1628, in test_networked_good_cert
h.request('GET', '/')
File "/home/greg/oss/cpython/Lib/http/client.py", line 1221, in requestself._send_request(method, url, body, headers, encode_chunked)
File "/home/greg/oss/cpython/Lib/http/client.py", line 1267, in _send_requestself.endheaders(body, encode_chunked=encode_chunked)
File "/home/greg/oss/cpython/Lib/http/client.py", line 1216, in endheadersself._send_output(message_body, encode_chunked=encode_chunked)
File "/home/greg/oss/cpython/Lib/http/client.py", line 1004, in _send_outputself.send(msg)
File "/home/greg/oss/cpython/Lib/http/client.py", line 944, in sendself.connect()
File "/home/greg/oss/cpython/Lib/http/client.py", line 1383, in connectself.sock =self._context.wrap_socket(self.sock,
File "/home/greg/oss/cpython/Lib/ssl.py", line 405, in wrap_socketreturnself.sslsocket_class._create(
File "/home/greg/oss/cpython/Lib/ssl.py", line 853, in _createself.do_handshake()
File "/home/greg/oss/cpython/Lib/ssl.py", line 1117, in do_handshakeself._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: EE certificate key too weak (_ssl.c:1055)
Assigning to EWDurbin for triage and redirection to someone else infrastructury if he's not the right person.
How to know if it has been fixed? Monitor the test_networked_good_cert test on any "Debian buster" builtbot(s) such as https://buildbot.python.org/all/#/workers/23 to make sure it is not skipped. (the test _currently_ fails, I am going to have it be _skipped_ on this specific key too small error for the time being to get that stable buildbot green again)
Traceback (most recent call last):
File "/home/yen/tmp/cpython/Lib/test/test_httplib.py", line 1632, in test_networked_good_cert
h.request('GET', '/')
File "/home/yen/tmp/cpython/Lib/http/client.py", line 1221, in requestself._send_request(method, url, body, headers, encode_chunked)
File "/home/yen/tmp/cpython/Lib/http/client.py", line 1267, in _send_requestself.endheaders(body, encode_chunked=encode_chunked)
File "/home/yen/tmp/cpython/Lib/http/client.py", line 1216, in endheadersself._send_output(message_body, encode_chunked=encode_chunked)
File "/home/yen/tmp/cpython/Lib/http/client.py", line 1004, in _send_outputself.send(msg)
File "/home/yen/tmp/cpython/Lib/http/client.py", line 944, in sendself.connect()
File "/home/yen/tmp/cpython/Lib/http/client.py", line 1383, in connectself.sock =self._context.wrap_socket(self.sock,
File "/home/yen/tmp/cpython/Lib/ssl.py", line 405, in wrap_socketreturnself.sslsocket_class._create(
File "/home/yen/tmp/cpython/Lib/ssl.py", line 853, in _createself.do_handshake()
File "/home/yen/tmp/cpython/Lib/ssl.py", line 1117, in do_handshakeself._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1055)
New changeset 6bd8173 by Miss Islington (bot) (Gregory P. Smith) in branch 'master': bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) 6bd8173
New changeset 2b9d7ab by Ned Deily (Gregory P. Smith) in branch '3.6':
[3.6] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) (GH-13198) 2b9d7ab
New changeset 6daaf3f by Miss Islington (bot) (Gregory P. Smith) in branch '3.7':
[3.7] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) (GH-13197) 6daaf3f
Traceback (most recent call last):
File "/home/buildbot/python-master/Lib/test/test_httplib.py", line 1632, in test_networked_good_cert
h.request('GET', '/')
File "/home/buildbot/python-master/Lib/http/client.py", line 1221, in requestself._send_request(method, url, body, headers, encode_chunked)
File "/home/buildbot/python-master/Lib/http/client.py", line 1267, in _send_requestself.endheaders(body, encode_chunked=encode_chunked)
File "/home/buildbot/python-master/Lib/http/client.py", line 1216, in endheadersself._send_output(message_body, encode_chunked=encode_chunked)
File "/home/buildbot/python-master/Lib/http/client.py", line 1004, in _send_outputself.send(msg)
File "/home/buildbot/python-master/Lib/http/client.py", line 944, in sendself.connect()
File "/home/buildbot/python-master/Lib/http/client.py", line 1383, in connectself.sock =self._context.wrap_socket(self.sock,
File "/home/buildbot/python-master/Lib/ssl.py", line 405, in wrap_socketreturnself.sslsocket_class._create(
File "/home/buildbot/python-master/Lib/ssl.py", line 853, in _createself.do_handshake()
File "/home/buildbot/python-master/Lib/ssl.py", line 1117, in do_handshakeself._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1055)
And I see why now:
test_networked_good_cert (test.test_httplib.HTTPSTest) ... skipped "Use of the 'network' resource not enabled"
Digging a bit:
buildbot@x064:[/home/buildbot/python-master]openssl s_client -connect self-signed.pythontest.net:443
CONNECTED(00000003)
depth=0 C = XY, ST = Castle Anthrax, L = Argument Clinic, O = Python Software Foundation, CN = self-signed.pythontest.net
verify error:num=18:self signed certificate
verify return:1
depth=0 C = XY, ST = Castle Anthrax, L = Argument Clinic, O = Python Software Foundation, CN = self-signed.pythontest.net
verify return:1
---
Certificate chain
0 s:/C=XY/ST=Castle Anthrax/L=Argument Clinic/O=Python Software Foundation/CN=self-signed.pythontest.net
And while this:
How to know if it has been fixed? Monitor the test_networked_good_cert test on any "Debian buster" builtbot(s) such as https://buildbot.python.org/all/#/workers/23 to make sure it is not skipped. (the test _currently_ fails, I am going to have it be _skipped_ on this specific key too small error for the time being to get that stable buildbot green again)
is nice for some, it is not nice for all!
Perhaps the test should be switched to 'warn' on failure, rather than error on failure, until fixed!
And, what it looks like you are trying to do with an updated 'signing" .pem is to remove the 'self-signed' charasteric.
If I understand it correctly, the new certificate is indeed still self-signed. It's updated to match the certificate deployed at https://self-signed.pythontest.net/. Under the hood load_verify_locations() at line 1628 is used to make the test accept any valid certificate signed with the given certificate.
As a record, with CPython e7cb23b and OpenSSL 1.1.1b on Arch Linux x86_64, the test is green:
test_networked_good_cert (test.test_httplib.HTTPSTest) ... ok
By the way, I believe the "key too weak" workaround can be removed now and then this issue can be closed.
New changeset 221178a by larryhastings (Gregory P. Smith) in branch '3.5':
[3.5] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) (bpo-13200) 221178a
Activity
gpshead commentedon May 6, 2019
test_httplib uses self-signed.pythontest.net in it's test_networked_good_cert test.
On modern Linux distros (current Debian testing sid), the certificate it currently uses is rightfully rejected as being too weak:
ERROR: test_networked_good_cert (test.test_httplib.HTTPSTest)
----------------------------------------------------------------------
The TLS certificate on the server needs to be updated to something modern. I _believe_ this can be done by someone with infrastructure access via an update to https://github.com/python/pythontestdotnet/tree/master/tls
Assigning to EWDurbin for triage and redirection to someone else infrastructury if he's not the right person.
How to know if it has been fixed? Monitor the test_networked_good_cert test on any "Debian buster" builtbot(s) such as https://buildbot.python.org/all/#/workers/23 to make sure it is not skipped. (the test _currently_ fails, I am going to have it be _skipped_ on this specific key too small error for the time being to get that stable buildbot green again)
gpshead commentedon May 6, 2019
EWDurbin says I can just open a PR with new certs in the repo and it'll go from there. :)
gpshead commentedon May 8, 2019
Updated cert+key committed to pythontestdotnet. reassigning to EWDurbin to see that they're deployed.
python/pythontestdotnet@2d12141
ewdurbin commentedon May 8, 2019
Cert updated, reassigning back to gregory.p.smith to verify and close this out.
yan12125 commentedon May 8, 2019
Lib/test/selfsigned_pythontestdotnet.pem in the cpython repository needs to be updated to match https://github.com/python/pythontestdotnet/blob/master/tls/self-signed-cert.pem, or the test fails :)
======================================================================
ERROR: test_networked_good_cert (test.test_httplib.HTTPSTest)
----------------------------------------------------------------------
miss-islington commentedon May 8, 2019
New changeset 6bd8173 by Miss Islington (bot) (Gregory P. Smith) in branch 'master':
bpo-36816: Update the self-signed.pythontest.net cert (GH-13192)
6bd8173
ned-deily commentedon May 8, 2019
New changeset 2b9d7ab by Ned Deily (Gregory P. Smith) in branch '3.6':
[3.6] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) (GH-13198)
2b9d7ab
miss-islington commentedon May 8, 2019
New changeset 6daaf3f by Miss Islington (bot) (Gregory P. Smith) in branch '3.7':
[3.7] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) (GH-13197)
6daaf3f
gpshead commentedon May 9, 2019
New changeset 7b5dca8 by Gregory P. Smith in branch '2.7':
[2.7] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) (GH-13199)
7b5dca8
aixtools commentedon May 21, 2019
I am not an OpenSSL expert - and I am conscious of OpenSSL changes with regard to 'acceptance' of anything self-signed.
And, what it looks like you are trying to do with an updated 'signing" .pem is to remove the 'self-signed' charasteric.
On AIX - atm - I get, as did Chih-Hsuan Yen (yan12125),
======================================================================
ERROR: test_networked_good_cert (test.test_httplib.HTTPSTest)
----------------------------------------------------------------------
And I see why now:
test_networked_good_cert (test.test_httplib.HTTPSTest) ... skipped "Use of the 'network' resource not enabled"
Digging a bit:
buildbot@x064:[/home/buildbot/python-master]openssl s_client -connect self-signed.pythontest.net:443
CONNECTED(00000003)
depth=0 C = XY, ST = Castle Anthrax, L = Argument Clinic, O = Python Software Foundation, CN = self-signed.pythontest.net
verify error:num=18:self signed certificate
verify return:1
depth=0 C = XY, ST = Castle Anthrax, L = Argument Clinic, O = Python Software Foundation, CN = self-signed.pythontest.net
verify return:1
---
Certificate chain
0 s:/C=XY/ST=Castle Anthrax/L=Argument Clinic/O=Python Software Foundation/CN=self-signed.pythontest.net
i:/C=XY/ST=Castle Anthrax/L=Argument Clinic/O=Python Software Foundation/CN=self-signed.pythontest.net
And while this:
How to know if it has been fixed? Monitor the test_networked_good_cert test on any "Debian buster" builtbot(s) such as https://buildbot.python.org/all/#/workers/23 to make sure it is not skipped. (the test _currently_ fails, I am going to have it be _skipped_ on this specific key too small error for the time being to get that stable buildbot green again)
is nice for some, it is not nice for all!
Perhaps the test should be switched to 'warn' on failure, rather than error on failure, until fixed!
aixtools commentedon May 21, 2019
p.s. On Centos I could not even get a python3 (at least not easily).
On debian (on POWER) I get the same error (message) as on AIX - although the line number did change.
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1056)
so, not a message about "key too small error" - pure, this is self-signed, so error.
aixtools commentedon May 21, 2019
On 21/05/2019 12:08, Michael Felt wrote:
yan12125 commentedon May 21, 2019
Hi Michael Felt,
If I understand it correctly, the new certificate is indeed still self-signed. It's updated to match the certificate deployed at https://self-signed.pythontest.net/. Under the hood load_verify_locations() at line 1628 is used to make the test accept any valid certificate signed with the given certificate.
As a record, with CPython e7cb23b and OpenSSL 1.1.1b on Arch Linux x86_64, the test is green:
test_networked_good_cert (test.test_httplib.HTTPSTest) ... ok
By the way, I believe the "key too weak" workaround can be removed now and then this issue can be closed.
larryhastings commentedon Jul 13, 2019
New changeset 221178a by larryhastings (Gregory P. Smith) in branch '3.5':
[3.5] bpo-36816: Update the self-signed.pythontest.net cert (GH-13192) (bpo-13200)
221178a
gpshead commentedon Sep 9, 2019
I believe this has been addressed.