Skip to content
Snippets Groups Projects
Commit 37928771 authored by William Roberts's avatar William Roberts Committed by Android Git Automerger
Browse files

am 14138335: tools: Strengthen BEGIN/END CERTIFICATE checks

* commit '14138335':
  tools: Strengthen BEGIN/END CERTIFICATE checks
parents f84a8ca7 14138335
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ class GenerateKeys(object):
for line in pkFile:
line = line.strip()
# Are we starting the certificate?
if line.startswith("-----BEGIN CERTIFICATE-----"):
if line == "-----BEGIN CERTIFICATE-----":
if inCert:
sys.exit("Encountered another BEGIN CERTIFICATE without END CERTIFICATE on " +
"line: " + str(lineNo))
......@@ -48,7 +48,7 @@ class GenerateKeys(object):
inCert = True
# Are we ending the ceritifcate?
elif line.startswith("-----END CERTIFICATE-----"):
elif line == "-----END CERTIFICATE-----":
if not inCert:
sys.exit("Encountered END CERTIFICATE before BEGIN CERTIFICATE on line: "
+ str(lineNo))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment