aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Kehrer <paul.l.kehrer@gmail.com>2014-02-20 18:01:03 -0600
committerPaul Kehrer <paul.l.kehrer@gmail.com>2014-02-20 18:01:03 -0600
commitb73dd29234e854d25c8fc09bdf5bb57143fc0250 (patch)
tree1f04b1cdfc47742c1fb6d3ce304dc222288f419c
parent83274d581eed40117ff555f247858af2d3bfbb8e (diff)
downloadcryptography-b73dd29234e854d25c8fc09bdf5bb57143fc0250.tar.gz
cryptography-b73dd29234e854d25c8fc09bdf5bb57143fc0250.tar.bz2
cryptography-b73dd29234e854d25c8fc09bdf5bb57143fc0250.zip
bytes and strings...yes.
-rw-r--r--cryptography/hazmat/backends/openssl/backend.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cryptography/hazmat/backends/openssl/backend.py b/cryptography/hazmat/backends/openssl/backend.py
index be584868..de6f841c 100644
--- a/cryptography/hazmat/backends/openssl/backend.py
+++ b/cryptography/hazmat/backends/openssl/backend.py
@@ -281,7 +281,7 @@ class Backend(object):
ownership of the object). Be sure to register it for GC if it will
be discarded after use.
"""
- hex_num = hex(num).rstrip("L").lstrip("0x") or "0"
+ hex_num = hex(num).rstrip("L").lstrip("0x").encode("ascii") or b"0"
bn_ptr = self._ffi.new("BIGNUM **")
res = self._lib.BN_hex2bn(bn_ptr, hex_num)
assert res != 0