Blame SOURCES/0003-fixes-6927-handle-negative-return-values-from-openss.patch
|
|
2753bc |
From 20bafea414bcc08bfcb5b669ecbf9a3438ff7b78 Mon Sep 17 00:00:00 2001
|
|
|
2753bc |
From: Alex Gaynor <alex.gaynor@gmail.com>
|
|
|
2753bc |
Date: Thu, 3 Mar 2022 15:44:02 -0500
|
|
|
2753bc |
Subject: [PATCH 3/5] fixes #6927 -- handle negative return values from openssl
|
|
|
2753bc |
(#6928)
|
|
|
2753bc |
|
|
|
2753bc |
---
|
|
|
2753bc |
src/cryptography/hazmat/backends/openssl/rsa.py | 2 +-
|
|
|
2753bc |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
2753bc |
|
|
|
2753bc |
diff --git a/src/cryptography/hazmat/backends/openssl/rsa.py b/src/cryptography/hazmat/backends/openssl/rsa.py
|
|
|
2753bc |
index 9bef49d24..dd5d4990b 100644
|
|
|
2753bc |
--- a/src/cryptography/hazmat/backends/openssl/rsa.py
|
|
|
2753bc |
+++ b/src/cryptography/hazmat/backends/openssl/rsa.py
|
|
|
2753bc |
@@ -208,7 +208,7 @@ def _rsa_sig_setup(backend, padding, algorithm, key, init_func):
|
|
|
2753bc |
if algorithm is not None:
|
|
|
2753bc |
evp_md = backend._evp_md_non_null_from_algorithm(algorithm)
|
|
|
2753bc |
res = backend._lib.EVP_PKEY_CTX_set_signature_md(pkey_ctx, evp_md)
|
|
|
2753bc |
- if res == 0:
|
|
|
2753bc |
+ if res <= 0:
|
|
|
2753bc |
backend._consume_errors()
|
|
|
2753bc |
raise UnsupportedAlgorithm(
|
|
|
2753bc |
"{} is not supported by this backend for RSA signing.".format(
|
|
|
2753bc |
--
|
|
|
2753bc |
2.35.1
|
|
|
2753bc |
|