| Index: chrome/browser/resources/ssl/ssl_error_assistant/gen_ssl_error_assistant_proto.py
|
| diff --git a/chrome/browser/resources/ssl/ssl_error_assistant/gen_ssl_error_assistant_proto.py b/chrome/browser/resources/ssl/ssl_error_assistant/gen_ssl_error_assistant_proto.py
|
| index 0b546657c332483e93ce136b00a13c696b7e3ed5..2c69d28867de3aa747a3e3d6d9482f16d6d4804f 100755
|
| --- a/chrome/browser/resources/ssl/ssl_error_assistant/gen_ssl_error_assistant_proto.py
|
| +++ b/chrome/browser/resources/ssl/ssl_error_assistant/gen_ssl_error_assistant_proto.py
|
| @@ -7,6 +7,7 @@
|
| Convert the ASCII ssl_error_assistant.asciipb proto into a binary resource.
|
| """
|
|
|
| +import base64
|
| import os
|
| import sys
|
|
|
| @@ -29,6 +30,10 @@ class SSLErrorAssistantProtoGenerator(BinaryProtoGenerator):
|
| def ValidatePb(self, opts, pb):
|
| assert pb.version_id > 0
|
| assert len(pb.captive_portal_cert) > 0
|
| + for cert in pb.captive_portal_cert:
|
| + assert(cert.sha256_hash.startswith("sha256/"))
|
| + decoded_hash = base64.b64decode(cert.sha256_hash[len("sha256/"):])
|
| + assert(len(decoded_hash) == 32)
|
|
|
| def ProcessPb(self, opts, pb):
|
| binary_pb_str = pb.SerializeToString()
|
|
|