diff options
author | Jon Dufresne <jon.dufresne@gmail.com> | 2018-11-11 18:21:27 -0800 |
---|---|---|
committer | Alex Gaynor <alex.gaynor@gmail.com> | 2018-11-11 21:21:27 -0500 |
commit | 6654329097ad35e451453f14391c04e44c1d060e (patch) | |
tree | fd10ab532f874d936d5ba5bb0ae3e5273679ff0c | |
parent | 5edac0c32baa8b9241284f3f9eebd4271bf7c57b (diff) | |
download | cryptography-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.
-rw-r--r-- | src/cryptography/x509/extensions.py | 2 |
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() |