aboutsummaryrefslogtreecommitdiff
path: root/oauth2client/crypt.py
diff options
context:
space:
mode:
authorDanny Hermes <daniel.j.hermes@gmail.com>2015-08-20 16:08:20 -0700
committerDanny Hermes <daniel.j.hermes@gmail.com>2015-08-21 08:24:01 -0700
commitd7c0c38b8d9c20fc24f5bd1bc8a368888025440d (patch)
tree674aa4dda462f6531c6bfbeb69c5bffadf31fa05 /oauth2client/crypt.py
parentb70baa4fab624e1f119960f0ddad3eae4a87aa2a (diff)
downloadoauth2client-d7c0c38b8d9c20fc24f5bd1bc8a368888025440d.tar.gz
Making oauth2client/ files pass PEP8.
Diffstat (limited to 'oauth2client/crypt.py')
-rw-r--r--oauth2client/crypt.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/oauth2client/crypt.py b/oauth2client/crypt.py
index 6d22472..de62e06 100644
--- a/oauth2client/crypt.py
+++ b/oauth2client/crypt.py
@@ -45,11 +45,9 @@ except ImportError:
OpenSSLVerifier = None
OpenSSLSigner = None
-
def pkcs12_key_as_pem(*args, **kwargs):
raise NotImplementedError('pkcs12_key_as_pem requires OpenSSL.')
-
try:
from oauth2client._pycrypto_crypt import PyCryptoVerifier
from oauth2client._pycrypto_crypt import PyCryptoSigner
@@ -66,7 +64,7 @@ elif PyCryptoSigner:
Verifier = PyCryptoVerifier
else:
raise ImportError('No encryption library found. Please install either '
- 'PyOpenSSL, or PyCrypto 2.6 or later')
+ 'PyOpenSSL, or PyCrypto 2.6 or later')
def make_signed_jwt(signer, payload):
@@ -157,10 +155,10 @@ def verify_signed_jwt_with_certs(jwt, certs, audience):
if now < earliest:
raise AppIdentityError('Token used too early, %d < %d: %s' %
- (now, earliest, json_body))
+ (now, earliest, json_body))
if now > latest:
raise AppIdentityError('Token used too late, %d > %d: %s' %
- (now, latest, json_body))
+ (now, latest, json_body))
# Check audience.
if audience is not None:
@@ -169,6 +167,6 @@ def verify_signed_jwt_with_certs(jwt, certs, audience):
raise AppIdentityError('No aud field in token: %s' % json_body)
if aud != audience:
raise AppIdentityError('Wrong recipient, %s != %s: %s' %
- (aud, audience, json_body))
+ (aud, audience, json_body))
return parsed