GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — python 3.11 test_ssl failure with OpenSSL 3.0 on Windows · Issue #101401 · python/cpython

python 3.11 test_ssl failure with OpenSSL 3.0 on Windows #101401

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
python 3.11 test_ssl failure with OpenSSL 3.0 on Windows#101401
Copy link
Labels
type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

Description

@mzhao-dev
mzhao-dev
opened on Jan 29, 2023
Issue body actions

Bug report

A clear and concise description of what the bug is.
when I ran test_ssl.py. It shows No OPENSSL_Applink runtime error and python crashed.

Include a minimal, reproducible example (https://stackoverflow.com/help/minimal-reproducible-example), if possible.

Your environment

  • CPython versions tested on: 3.11.1
  • Operating system and architecture: windows

I could build my local python through modify get_external.bat ssl.props python.props ect.
to make my _ssl.pyd call local OPENSSL 3.0 libraries libcrypto-3-x64.dll and libssl-3-x64.dll
But when I ran test_ssl.py. It shows No OPENSSL_Applink runtime error and python crashed.

test_ssl: testing with 'OpenSSL 3.0.7 1 Nov 2022' (3, 0, 0, 7, 0)
under Windows ('10', '10.0.22621', 'SP0', 'Multiprocessor Free')
HAS_SNI = True
OP_ALL = 0x-7fffffb0
OP_NO_TLSv1_1 = 0x10000000
...s...............
{'OCSP': ('http://ocsp.verisign.com/',),
'caIssuers': ('http://svrintl-g3-aia.verisign.com/SVRIntlG3.cer',),
'crlDistributionPoints': ('http://svrintl-g3-crl.verisign.com/SVRIntlG3.crl',),
'issuer': ((('countryName', 'US'),),
(('organizationName', 'VeriSign, Inc.'),),
(('organizationalUnitName', 'VeriSign Trust Network'),),
(('organizationalUnitName',
'Terms of use at https://www.verisign.com/rpa (c)10'),),
(('commonName', 'VeriSign Class 3 International Server CA - G3'),)),
'notAfter': 'Sep 20 23:59:59 2012 GMT',
'notBefore': 'Sep 21 00:00:00 2011 GMT',
'serialNumber': '2EE6EA7640A075CEE5005F4D7C79549A',
'subject': ((('countryName', 'FI'),),
(('stateOrProvinceName', 'Espoo'),),
(('localityName', 'Espoo'),),
(('organizationName', 'Nokia'),),
(('organizationalUnitName', 'BI'),),
(('commonName', 'projects.developer.nokia.com'),)),
'subjectAltName': (('DNS', 'projects.developer.nokia.com'),
('DNS', 'projects.forum.nokia.com')),
'version': 3}
.
{'issuer': ((('countryName', 'US'),),
(('stateOrProvinceName', 'Oregon'),),
(('localityName', 'Beaverton'),),
(('organizationName', 'Python Software Foundation'),),
(('organizationalUnitName', 'Python Core Development'),),
(('commonName', 'null.python.org\x00example.org'),),
(('emailAddress', '[email protected]'),)),
'notAfter': 'Aug 7 13:12:52 2013 GMT',
'notBefore': 'Aug 7 13:11:52 2013 GMT',
'serialNumber': '00',
'subject': ((('countryName', 'US'),),
(('stateOrProvinceName', 'Oregon'),),
(('localityName', 'Beaverton'),),
(('organizationName', 'Python Software Foundation'),),
(('organizationalUnitName', 'Python Core Development'),),
(('commonName', 'null.python.org\x00example.org'),),
(('emailAddress', '[email protected]'),)),
'subjectAltName': (('DNS', 'altnull.python.org\x00example.com'),
('email', '[email protected][[email protected]](mailto:[email protected])'),
('URI', 'http://null.python.org\x00http://example.org'),
('IP Address', '192.0.2.1'),
('IP Address', '2001:DB8:0:0:0:0:0:1')),
'version': 3}
.
{'issuer': ((('countryName', 'UK'),), (('commonName', 'cody-ca'),)),
'notAfter': 'Jun 14 18:00:58 2028 GMT',
'notBefore': 'Jun 18 18:00:58 2018 GMT',
'serialNumber': '02',
'subject': ((('countryName', 'UK'),),
(('commonName', 'codenomicon-vm-2.test.lal.cisco.com'),)),
'subjectAltName': (('DNS', 'codenomicon-vm-2.test.lal.cisco.com'),),
'version': 3}
...
RAND_status is 1 (sufficient randomness)
. server: new connection from ('127.0.0.1', 65259)

server: bad connection attempt from ('127.0.0.1', 65259):
Traceback (most recent call last):
File "C:\Git_root\mv-pkg\Python-3.11.1\Lib\test\test_ssl.py", line 2436, in wrap_conn
self.sslconn = self.server.context.wrap_socket(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Git_root\mv-pkg\Python-3.11.1\Lib\ssl.py", line 517, in wrap_socket
return self.sslsocket_class._create(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Git_root\mv-pkg\Python-3.11.1\Lib\ssl.py", line 1075, in _create
self.do_handshake()
File "C:\Git_root\mv-pkg\Python-3.11.1\Lib\ssl.py", line 1346, in do_handshake
self._sslobj.do_handshake()
ConnectionAbortedError: [WinError 10053] An established connection was aborted by the software in your host machine
.......................s.OPENSSL_Uplink(00007FFB16F545C0,08): no OPENSSL_Applink

Does any one can help?

Activity

  1. mzhao-dev
    added
    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
    on Jan 29, 2023
  2. stevendaprano commented on Jan 29, 2023

    @stevendaprano
    stevendaprano
    on Jan 29, 2023
    Member
    More actions

    I read the title of this and my first thought was "Surely nobody is still using Windows 3.11 any more? I can't believe there is a Python that runs on it!" 😁

  3. mzhao-dev commented on Jan 30, 2023

    @mzhao-dev
    mzhao-dev
    on Jan 30, 2023
    Author
    More actions

    Hi Setvendaprano
    Sorry for puzzled you, I mean on windows 10 platform I compiled python 3.11.1 with OPENSSL 3.0.7, when I run test_ssl.py, it shows no OPENSSL_Applink, error and crashed.
    I confirmed that applink.c file was added and complied, so I have no idea about that issue. I think maybe need some other code change about that?

    thank you so much

  4. mzhao-dev
    changed the title [-]Windows 3.11.1 support for OpenSSL 3.0[/-] [+]python 3.11.1 support for OpenSSL 3.0 on Windows[/+] on Jan 30, 2023
  5. zooba commented on Feb 3, 2023

    @zooba
    zooba
    on Feb 3, 2023
    Member
    More actions

    It's likely because we require a patch to OpenSSL to properly connect the applink.

    This line in OpenSSL checks the current executable for the applink export, but we don't include it in python.exe - it goes in _ssl.pyd. So we patch our own builds to look in there (as well as the executable and _ssl_d.pyd to cover all our cases).

    We likely need to upstream some kind of runtime option to OpenSSL to handle this without patching, or they need to provide an API we can use to pass in the applink table directly. As far as I know, we haven't asked them for that though.

  6. gpshead
    changed the title [-]python 3.11.1 support for OpenSSL 3.0 on Windows[/-] [+]python 3.11 test_ssl failure with OpenSSL 3.0 on Windows[/+] on May 20, 2023
  7. gpshead
    added this to OpenSSL 3on May 20, 2023
  8. zware commented on Jul 18, 2023

    @zware
    zware
    on Jul 18, 2023
    Member
    More actions

    This doesn't reproduce in CI or on our buildbots using our build of OpenSSL 3.0.9, so I'm going to go ahead and close it. If I've missed something here and it can still be reproduced elsewhere, the issue can of course be reopened.

  9. zware
    closed this as not plannedon Jul 18, 2023
  10. github-project-automation
    moved this to Done in OpenSSL 3on Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error

    Projects

    • OpenSSL 3
      Status
      Done
      Show more project fields

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402520 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.