Skip to content
This repository has been archived by the owner on Jun 9, 2022. It is now read-only.

Commit

Permalink
Fix Python 2 compatibility.
Browse files Browse the repository at this point in the history
  • Loading branch information
dainnilsson committed Nov 3, 2020
1 parent e094619 commit 97e2d29
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion u2flib_server/attestation/matchers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
# POSSIBILITY OF SUCH DAMAGE.

from cryptography.x509 import ExtensionNotFound, ObjectIdentifier
from binascii import a2b_hex


__all__ = [
Expand Down Expand Up @@ -72,7 +73,7 @@ def matches(self, certificate, parameters={}):

if isinstance(match_value, dict):
if match_value['type'] == 'hex':
match_value = bytes.fromhex(match_value['value'])
match_value = a2b_hex(match_value['value'])
else:
return False

Expand Down

0 comments on commit 97e2d29

Please sign in to comment.