Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:mcepl:branches:devel:languages:python:Factory
python36
openssl-300-no-re-passwd-clbck.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File openssl-300-no-re-passwd-clbck.patch of Package python36
From fa60769790ba6d57ade8d7f6857fb01f9a6da034 Mon Sep 17 00:00:00 2001 From: Christian Heimes <christian@python.org> Date: Fri, 9 Apr 2021 15:23:38 +0200 Subject: [PATCH] OpenSSL 3.0.0: Don't call passwd callback again in error case Don't call the password callback function a second time when first call has signaled an error condition. (cherry picked from commit gh#python/cpython@d3b73f3) Co-authored-by: Christian Heimes <christian@python.org> Fixes: bpo#43789 From-PR: gh#python/cpython!25303 Patch: openssl-300-no-re-passwd-clbck.patch Released-in: 3.8.10 --- .../next/Library/2021-04-09-14-08-03.bpo-43789.eaHlAm.rst | 2 ++ Modules/_ssl.c | 7 +++++++ 2 files changed, 9 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2021-04-09-14-08-03.bpo-43789.eaHlAm.rst diff --git a/Misc/NEWS.d/next/Library/2021-04-09-14-08-03.bpo-43789.eaHlAm.rst b/Misc/NEWS.d/next/Library/2021-04-09-14-08-03.bpo-43789.eaHlAm.rst new file mode 100644 index 00000000000..1c085294621 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-04-09-14-08-03.bpo-43789.eaHlAm.rst @@ -0,0 +1,2 @@ +OpenSSL 3.0.0: Don't call the password callback function a second time when +first call has signaled an error condition. diff --git a/Modules/_ssl.c b/Modules/_ssl.c index cc90daef7f0..7108dcbedb3 100644 --- a/Modules/_ssl.c +++ b/Modules/_ssl.c @@ -3425,6 +3425,13 @@ _password_callback(char *buf, int size, int rwflag, void *userdata) PySSL_END_ALLOW_THREADS_S(pw_info->thread_state); + if (pw_info->error) { + /* already failed previously. OpenSSL 3.0.0-alpha14 invokes the + * callback multiple times which can lead to fatal Python error in + * exception check. */ + goto error; + } + if (pw_info->callable) { fn_ret = PyObject_CallFunctionObjArgs(pw_info->callable, NULL); if (!fn_ret) { -- 2.46.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor