This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Getting error while importing ssl "import _ssl ImportError: DLL load failed: The specified procedure could not be found."
Type: behavior Stage: resolved
Components: SSL, Windows Versions: Python 3.7
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: christian.heimes Nosy List: Tarnum, christian.heimes, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2021-05-15 10:39 by Tarnum, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Messages (4)
msg393711 - (view) Author: Tarnum (Tarnum) Date: 2021-05-15 10:39
Hello! I'm using specifically crafted Python 3.7.1 for NT 5.2 x86 (Server 2003 R2) and cannot upgrade Python to later versions.
I always building OpenSSL myself using compatible version of MSYS2 with perl 5.22.
Compiled DLLs of OpenSSL 1.1.1k works fine for me (libcrypto-1_1.dll and libssl-1_1.dll in C:\Python37\DLLs\).
But when I try building OpenSSL 3.0.0 alpha 16 (repacing libcrypto-3.dll with libcrypto-1_1.dll and libssl-3.dll with libssl-1_1.dll in
Makefile and util\mkdef.pl) I got this error because of OpenSSL 3.0 backwards incompatibility:

import ssl
File "C:\Python37\lib\ssl.py", line 98, in <module>
import _ssl (C:\Python37\DLLs\_ssl.pyd) # if we can't import it, let the error propagate
ImportError: DLL load failed: The specified procedure could not be found.

What could I do to fix it? Thanks in advance!
msg393734 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-05-16 09:23
Python 3.7 is in security fix-only mode and will not get support for OpenSSL 3.0.0. Only Python 3.8, 3.9, 3.10 beta, and main branch contain OpenSSL 3.0.0 compatibility patches.
msg393736 - (view) Author: Tarnum (Tarnum) Date: 2021-05-16 09:35
Got it but this is a sad news for me...
msg393737 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2021-05-16 09:56
OpenSSL 3.0.0 is in alpha phase, which means it is unstable, experimental, and not designed for end-users or production use. I recommend that you stick to OpenSSL 1.1.1. It will be supported until September 2023.
History
Date User Action Args
2022-04-11 14:59:45adminsetgithub: 88307
2021-05-16 09:56:28christian.heimessetstatus: open -> closed
resolution: wont fix
messages: + msg393737

stage: resolved
2021-05-16 09:35:29Tarnumsetmessages: + msg393736
2021-05-16 09:23:27christian.heimessetmessages: + msg393734
2021-05-15 10:39:03Tarnumcreate