diff options
author | Petr Mensik <pemensik@redhat.com> | 2022-08-02 22:04:38 +0200 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2023-02-04 18:02:19 +0100 |
commit | 05bf70d0fb13f894536dcc83834022137a68ada0 (patch) | |
tree | 04ec94ff4455ed47cd1ade6a5ce48e00a28bbb57 /src | |
parent | 429bf9f4642a2272841ca5f3e559d5e6fe60f950 (diff) | |
download | m2crypto-05bf70d0fb13f894536dcc83834022137a68ada0.tar.gz |
Changed required to pass tests on OpenSSL 3.0
Just changes to make the package pass tests. Some are just cosmetic
changes. Some would require proper investigation.
Fixes #310
Diffstat (limited to 'src')
-rw-r--r-- | src/SWIG/_bio.i | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/SWIG/_bio.i b/src/SWIG/_bio.i index 6c090a4..654fa99 100644 --- a/src/SWIG/_bio.i +++ b/src/SWIG/_bio.i @@ -250,8 +250,14 @@ PyObject *bio_set_cipher(BIO *b, EVP_CIPHER *c, PyObject *key, PyObject *iv, int || (m2_PyObject_AsReadBuffer(iv, &ibuf, &ilen) == -1)) return NULL; +#if OPENSSL_VERSION_NUMBER >= 0x30000000L + if (!BIO_set_cipher(b, (const EVP_CIPHER *)c, + (unsigned char *)kbuf, (unsigned char *)ibuf, op)) + return NULL; +#else BIO_set_cipher(b, (const EVP_CIPHER *)c, (unsigned char *)kbuf, (unsigned char *)ibuf, op); +#endif Py_RETURN_NONE; } |