From f409b1553513e54c5c61e714c0ca696eb75d57db Mon Sep 17 00:00:00 2001 From: "jai.s" Date: Wed, 23 Sep 2020 19:59:48 +0530 Subject: [PATCH] Added buytes in the malloc method --- src/pyelliptic/openssl.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/pyelliptic/openssl.py b/src/pyelliptic/openssl.py index 9810f9c9..0fa060b5 100755 --- a/src/pyelliptic/openssl.py +++ b/src/pyelliptic/openssl.py @@ -725,7 +725,7 @@ class _OpenSSL(object): if data != 0: if sys.version_info.major == 3 and isinstance(data, type('')): data = data.encode() - buffer_ = self.create_string_buffer(data, size) + buffer_ = self.create_string_buffer(bytes(data), size) else: buffer_ = self.create_string_buffer(size) return buffer_ @@ -734,7 +734,6 @@ class _OpenSSL(object): def loadOpenSSL(): """Method find and load the OpenSSL library""" # pylint: disable=global-statement, protected-access, too-many-branches - global OpenSSL from os import path, environ from ctypes.util import find_library