diff options
Diffstat (limited to 'jwt/algorithms.py')
-rw-r--r-- | jwt/algorithms.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/jwt/algorithms.py b/jwt/algorithms.py index bae715e..6ba8c12 100644 --- a/jwt/algorithms.py +++ b/jwt/algorithms.py @@ -97,8 +97,7 @@ class HMACAlgorithm(Algorithm): if isinstance(key, text_type): key = key.encode('utf-8') - if (b'-----BEGIN PUBLIC KEY-----' in key - or b'-----BEGIN CERTIFICATE-----' in key): + if (b'-----BEGIN PUBLIC KEY-----' in key or b'-----BEGIN CERTIFICATE-----' in key): raise InvalidAlgorithmError( 'The specified key is an assymetric key or x509 certificate and' ' should not be used as an HMAC secret.') |