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

Unified Diff: chrome/browser/policy/test/policy_testserver.py

Issue 210323002: Update tlslite to 0.4.6. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Executable bit and --similarity=80 Created 6 years, 8 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
« no previous file with comments | « chrome/browser/chromeos/login/test/https_forwarder.py ('k') | net/tools/testserver/testserver.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/test/policy_testserver.py
diff --git a/chrome/browser/policy/test/policy_testserver.py b/chrome/browser/policy/test/policy_testserver.py
index 1bb4bbbfdb7b174670f1dc27976199470384bb81..13b98f97ae27f54106f1726095a26aa721874be8 100644
--- a/chrome/browser/policy/test/policy_testserver.py
+++ b/chrome/browser/policy/test/policy_testserver.py
@@ -735,7 +735,7 @@ class PolicyRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
response.policy_data = signed_data
if signing_key:
response.policy_data_signature = (
- signing_key['private_key'].hashAndSign(signed_data).tostring())
+ bytes(signing_key['private_key'].hashAndSign(signed_data)))
if msg.public_key_version != current_key_index + 1:
response.new_public_key = signing_key['public_key']
@@ -753,7 +753,7 @@ class PolicyRequestHandler(BaseHTTPServer.BaseHTTPRequestHandler):
if req_key:
response.new_public_key_signature = (
- req_key.hashAndSign(response.new_public_key).tostring())
+ bytes(req_key.hashAndSign(response.new_public_key)))
return (200, response.SerializeToString())
@@ -848,7 +848,7 @@ class PolicyTestServer(testserver_base.BrokenPipeHandlerMixIn,
key = tlslite.api.parsePEMKey(key_str, private=True)
except SyntaxError:
key = tlslite.utils.python_rsakey.Python_RSAKey._parsePKCS8(
- tlslite.utils.cryptomath.stringToBytes(key_str))
+ bytearray(key_str))
assert key is not None
key_info = { 'private_key' : key }
@@ -866,7 +866,7 @@ class PolicyTestServer(testserver_base.BrokenPipeHandlerMixIn,
for signing_key in SIGNING_KEYS:
decoded_key = base64.b64decode(signing_key['key']);
key = tlslite.utils.python_rsakey.Python_RSAKey._parsePKCS8(
- tlslite.utils.cryptomath.stringToBytes(decoded_key))
+ bytearray(decoded_key))
assert key is not None
# Grab the signature dictionary for this key and decode all of the
# signatures.
« no previous file with comments | « chrome/browser/chromeos/login/test/https_forwarder.py ('k') | net/tools/testserver/testserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698