Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(654)

Unified Diff: client/third_party/oauth2client/_pycrypto_crypt.py

Issue 1768993002: Update oauth2client to v2.0.1 and googleapiclient to v1.5.0. Base URL: git@github.com:luci/luci-py.git@master
Patch Set: . Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: client/third_party/oauth2client/_pycrypto_crypt.py
diff --git a/client/third_party/oauth2client/_pycrypto_crypt.py b/client/third_party/oauth2client/_pycrypto_crypt.py
index 7b277aa889f66c4eca48f06293ee943ce55f1cb7..5ee7046db264c52e91db6b73ad99ca770d1bdd64 100644
--- a/client/third_party/oauth2client/_pycrypto_crypt.py
+++ b/client/third_party/oauth2client/_pycrypto_crypt.py
@@ -115,14 +115,12 @@ class PyCryptoSigner(object):
Raises:
NotImplementedError if the key isn't in PEM format.
"""
- parsed_pem_key = _parse_pem_key(key)
+ parsed_pem_key = _parse_pem_key(_to_bytes(key))
if parsed_pem_key:
pkey = RSA.importKey(parsed_pem_key)
else:
raise NotImplementedError(
- 'PKCS12 format is not supported by the PyCrypto library. '
- 'Try converting to a "PEM" '
- '(openssl pkcs12 -in xxxxx.p12 -nodes -nocerts > '
- 'privatekey.pem) '
- 'or using PyOpenSSL if native code is an option.')
+ 'No key in PEM format was detected. This implementation '
+ 'can only use the PyCrypto library for keys in PEM '
+ 'format.')
return PyCryptoSigner(pkey)

Powered by Google App Engine
This is Rietveld 408576698