aboutsummaryrefslogtreecommitdiffstats
path: root/src/cryptography/x509
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2018-11-11 18:21:27 -0800
committerAlex Gaynor <alex.gaynor@gmail.com>2018-11-11 21:21:27 -0500
commit6654329097ad35e451453f14391c04e44c1d060e (patch)
treefd10ab532f874d936d5ba5bb0ae3e5273679ff0c /src/cryptography/x509
parent5edac0c32baa8b9241284f3f9eebd4271bf7c57b (diff)
downloadcryptography-6654329097ad35e451453f14391c04e44c1d060e.tar.gz
cryptography-6654329097ad35e451453f14391c04e44c1d060e.tar.bz2
cryptography-6654329097ad35e451453f14391c04e44c1d060e.zip
Remove unnecessary use of six.binary_type (#4569)
All supported Pythons have type bytes. On Python 2, it is an alias of str, same as six.binary_type. Makes the code slightly more forward compatible and removes some indirection.
Diffstat (limited to 'src/cryptography/x509')
-rw-r--r--src/cryptography/x509/extensions.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cryptography/x509/extensions.py b/src/cryptography/x509/extensions.py
index 6301af5a..fc5c17a9 100644
--- a/src/cryptography/x509/extensions.py
+++ b/src/cryptography/x509/extensions.py
@@ -43,7 +43,7 @@ def _key_identifier_from_public_key(public_key):
serialization.PublicFormat.SubjectPublicKeyInfo
)
- data = six.binary_type(PublicKeyInfo.load(serialized)['public_key'])
+ data = bytes(PublicKeyInfo.load(serialized)['public_key'])
return hashlib.sha1(data).digest()