diff options
author | Matěj Cepl <mcepl@cepl.eu> | 2020-11-05 03:33:24 +0100 |
---|---|---|
committer | Matěj Cepl <mcepl@cepl.eu> | 2020-12-08 09:16:35 +0100 |
commit | 6bb65c27f01dd69f08c4654ce531fb283c7bcc07 (patch) | |
tree | d02f4687ffc39457befd10be1f6cfb8fd344f36c /SWIG/_bio.i | |
parent | d9dec89a2d46c21459f9d2644f914f1b3f5d8144 (diff) | |
download | m2crypto-6bb65c27f01dd69f08c4654ce531fb283c7bcc07.tar.gz |
Replace deprecated PyObject_AsReadBuffer with our own shim.
Fixes #281.
Diffstat (limited to 'SWIG/_bio.i')
-rw-r--r-- | SWIG/_bio.i | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/SWIG/_bio.i b/SWIG/_bio.i index e85a275..84b76b3 100644 --- a/SWIG/_bio.i +++ b/SWIG/_bio.i @@ -250,7 +250,7 @@ PyObject *bio_set_cipher(BIO *b, EVP_CIPHER *c, PyObject *key, PyObject *iv, int || (PyObject_AsReadBuffer(iv, &ibuf, &ilen) == -1)) return NULL; - BIO_set_cipher(b, (const EVP_CIPHER *)c, + BIO_set_cipher(b, (const EVP_CIPHER *)c, (unsigned char *)kbuf, (unsigned char *)ibuf, op); Py_RETURN_NONE; } |