summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authoragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-24 16:33:41 +0000
committeragl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-24 16:33:41 +0000
commitef08de96c04109ade75ece55ae228de4607ebaf7 (patch)
treee9fe5c349137de2fd59d0891b20f0facc7163fac /net
parent49ff2d067afda7cf6d229eccb5f4be12c11869ef (diff)
downloadchromium_src-ef08de96c04109ade75ece55ae228de4607ebaf7.zip
chromium_src-ef08de96c04109ade75ece55ae228de4607ebaf7.tar.gz
chromium_src-ef08de96c04109ade75ece55ae228de4607ebaf7.tar.bz2
testserver: pass options through bytes() before using with binary data.
Previously the arguments to GenerateCertKeyAndOCSP were used in operations with binary data directly. If they were unicode objects then their encoding may not have supported the DER data causing an error. By passing through bytes(), we get a str object and we make it clear that we'll be using this with binary data. BUG=119642 TEST=net_unittests Review URL: http://codereview.chromium.org/10188005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133704 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r--net/tools/testserver/minica.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/tools/testserver/minica.py b/net/tools/testserver/minica.py
index 9824fd0..48da3c7 100644
--- a/net/tools/testserver/minica.py
+++ b/net/tools/testserver/minica.py
@@ -318,7 +318,8 @@ def GenerateCertKeyAndOCSP(subject = "127.0.0.1",
None'''
serial = RandomNumber(16)
- cert_der = MakeCertificate(ISSUER_CN, subject, serial, KEY, KEY, ocsp_url)
+ cert_der = MakeCertificate(ISSUER_CN, bytes(subject), serial, KEY, KEY,
+ bytes(ocsp_url))
cert_pem = DERToPEM(cert_der)
ocsp_der = None