diff options
author | Baligh Uddin <baligh@google.com> | 2013-11-13 00:22:34 +0000 |
---|---|---|
committer | Baligh Uddin <baligh@google.com> | 2013-11-13 00:23:10 +0000 |
commit | beb6afdee207db58a42b708faed15eda611477eb (patch) | |
tree | ed373c5d60dcda39db36a97c06f337742f075cdd /tools/releasetools/check_target_files_signatures | |
parent | a7b5c4a7dc77a0896d6314828b9ce85f82d103e8 (diff) | |
download | build-beb6afdee207db58a42b708faed15eda611477eb.zip build-beb6afdee207db58a42b708faed15eda611477eb.tar.gz build-beb6afdee207db58a42b708faed15eda611477eb.tar.bz2 |
Revert the revert. (its time to sign MR1)
Revert "Waiting till post MR0 - this impacts signing tools for MR0."
This reverts commit a7b5c4a7dc77a0896d6314828b9ce85f82d103e8.
Bug: 11334314
Change-Id: I89f8996161e4258b80bf2d0bc7817f0e8e32df13
Diffstat (limited to 'tools/releasetools/check_target_files_signatures')
-rwxr-xr-x | tools/releasetools/check_target_files_signatures | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/tools/releasetools/check_target_files_signatures b/tools/releasetools/check_target_files_signatures index ae372ba..45d30a6 100755 --- a/tools/releasetools/check_target_files_signatures +++ b/tools/releasetools/check_target_files_signatures @@ -135,7 +135,7 @@ class CertDB(object): for i in to_load: f = open(i) - cert = ParseCertificate(f.read()) + cert = common.ParseCertificate(f.read()) f.close() name, _ = os.path.splitext(i) name, _ = os.path.splitext(name) @@ -144,21 +144,6 @@ class CertDB(object): ALL_CERTS = CertDB() -def ParseCertificate(data): - """Parse a PEM-format certificate.""" - cert = [] - save = False - for line in data.split("\n"): - if "--END CERTIFICATE--" in line: - break - if save: - cert.append(line) - if "--BEGIN CERTIFICATE--" in line: - save = True - cert = "".join(cert).decode('base64') - return cert - - def CertFromPKCS7(data, filename): """Read the cert out of a PKCS#7-format file (which is what is stored in a signed .apk).""" @@ -175,7 +160,7 @@ def CertFromPKCS7(data, filename): AddProblem("error reading cert:\n" + err) return None - cert = ParseCertificate(out) + cert = common.ParseCertificate(out) if not cert: AddProblem("error parsing cert output") return None |