Skip to content

Commit

Permalink
Merge pull request #110 from jgehrcke/patch-1
Browse files Browse the repository at this point in the history
Fix typo in error message upon key deserialization
  • Loading branch information
mpdavis committed Sep 25, 2018
2 parents b3c04ff + fb01ecc commit 7bc6b98
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jose/backends/cryptography_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def __init__(self, key, algorithm, cryptography_backend=default_backend):

def _process_jwk(self, jwk_dict):
if not jwk_dict.get('kty') == 'EC':
raise JWKError("Incorrect key type. Expected: 'EC', Recieved: %s" % jwk_dict.get('kty'))
raise JWKError("Incorrect key type. Expected: 'EC', Received: %s" % jwk_dict.get('kty'))

if not all(k in jwk_dict for k in ['x', 'y', 'crv']):
raise JWKError('Mandatory parameters are missing')
Expand Down Expand Up @@ -212,7 +212,7 @@ def __init__(self, key, algorithm, cryptography_backend=default_backend):

def _process_jwk(self, jwk_dict):
if not jwk_dict.get('kty') == 'RSA':
raise JWKError("Incorrect key type. Expected: 'RSA', Recieved: %s" % jwk_dict.get('kty'))
raise JWKError("Incorrect key type. Expected: 'RSA', Received: %s" % jwk_dict.get('kty'))

e = base64_to_long(jwk_dict.get('e', 256))
n = base64_to_long(jwk_dict.get('n'))
Expand Down

0 comments on commit 7bc6b98

Please sign in to comment.