From 6654329097ad35e451453f14391c04e44c1d060e Mon Sep 17 00:00:00 2001 From: Jon Dufresne Date: Sun, 11 Nov 2018 18:21:27 -0800 Subject: 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. --- src/cryptography/x509/extensions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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() -- cgit v1.2.3