aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cryptography/hazmat/backends/openssl/backend.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/cryptography/hazmat/backends/openssl/backend.py b/src/cryptography/hazmat/backends/openssl/backend.py
index ed205285..b121df03 100644
--- a/src/cryptography/hazmat/backends/openssl/backend.py
+++ b/src/cryptography/hazmat/backends/openssl/backend.py
@@ -975,7 +975,9 @@ class Backend(object):
)
ext_struct = encode(self, extension.value)
- nid = self._lib.OBJ_txt2nid(extension.oid.dotted_string)
+ nid = self._lib.OBJ_txt2nid(
+ extension.oid.dotted_string.encode("ascii")
+ )
x509_extension = self._lib.X509V3_EXT_i2d(
nid, 1 if extension.critical else 0, ext_struct
)