Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
SUSE:SLE-15-SP1:GA
python-M2Crypto.25010
CVE-2020-25657-Bleichenbacher-attack.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File CVE-2020-25657-Bleichenbacher-attack.patch of Package python-M2Crypto.25010
--- SWIG/_m2crypto_wrap.c | 10 ++++++---- SWIG/_rsa.i | 10 ++++++---- tests/test_rsa.py | 2 -- 3 files changed, 12 insertions(+), 10 deletions(-) --- a/SWIG/_m2crypto_wrap.c +++ b/SWIG/_m2crypto_wrap.c @@ -6877,9 +6877,10 @@ PyObject *rsa_public_decrypt(RSA *rsa, P tlen = RSA_public_decrypt(flen, (unsigned char *)fbuf, (unsigned char *)tbuf, rsa, padding); if (tlen == -1) { - m2_PyErr_Msg(_rsa_err); + ERR_clear_error(); + PyErr_Clear(); PyMem_Free(tbuf); - return NULL; + Py_RETURN_NONE; } ret = PyBytes_FromStringAndSize((const char *)tbuf, tlen); @@ -6931,9 +6932,10 @@ PyObject *rsa_private_decrypt(RSA *rsa, tlen = RSA_private_decrypt(flen, (unsigned char *)fbuf, (unsigned char *)tbuf, rsa, padding); if (tlen == -1) { - m2_PyErr_Msg(_rsa_err); + ERR_clear_error(); + PyErr_Clear(); PyMem_Free(tbuf); - return NULL; + Py_RETURN_NONE; } ret = PyBytes_FromStringAndSize((const char *)tbuf, tlen); --- a/SWIG/_rsa.i +++ b/SWIG/_rsa.i @@ -267,9 +267,10 @@ PyObject *rsa_public_decrypt(RSA *rsa, P tlen = RSA_public_decrypt(flen, (unsigned char *)fbuf, (unsigned char *)tbuf, rsa, padding); if (tlen == -1) { - m2_PyErr_Msg(_rsa_err); + ERR_clear_error(); + PyErr_Clear(); PyMem_Free(tbuf); - return NULL; + Py_RETURN_NONE; } ret = PyBytes_FromStringAndSize((const char *)tbuf, tlen); @@ -321,9 +322,10 @@ PyObject *rsa_private_decrypt(RSA *rsa, tlen = RSA_private_decrypt(flen, (unsigned char *)fbuf, (unsigned char *)tbuf, rsa, padding); if (tlen == -1) { - m2_PyErr_Msg(_rsa_err); + ERR_clear_error(); + PyErr_Clear(); PyMem_Free(tbuf); - return NULL; + Py_RETURN_NONE; } ret = PyBytes_FromStringAndSize((const char *)tbuf, tlen); --- a/tests/test_rsa.py +++ b/tests/test_rsa.py @@ -154,8 +154,6 @@ class RSATestCase(unittest.TestCase): with self.assertRaises(RSA.RSAError): setattr(rsa, 'e', '\000\000\000\003\001\000\001') with self.assertRaises(RSA.RSAError): - rsa.private_encrypt(1) - with self.assertRaises(RSA.RSAError): rsa.private_decrypt(1) assert rsa.check_key()
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