Nick Sweeting added the comment:
Actually I suspected it was OpenSSL first, I filed the report on their github
issues, then went on a fun little wild goose chase that ended in the CPython
issue tracker. :)
https://github.com/openssl/openssl/issues/2260
Thanks for helping debug this so
New submission from Nick Sweeting:
I mistakenly thought this bug was a pyOpenSSL bug, so I reported it there
(https://github.com/pyca/pyopenssl/issues/588), but it looks like this is
actually a bug in CPython.
See the link for a nicer formatted bug report with more details.
Code to reproduce