Commit graph

2 commits

Author SHA1 Message Date
Tao Bao
4c851b1098 Change the default parameter values in common.MakeTempFile().
tempfile.TemporaryFile() complains when 'None' is passed as the
prefix/suffix. It uses prefix='tmp' and suffix='' as the default values
and we should do the same.

Test: Call check_ota_package_signature.py and ota_from_target_files.py
and they still work.

Change-Id: I7fb023a3fd0b1a57c009631d0c57a7bb8e4cb5a3
2016-09-19 13:58:49 -07:00
Tao Bao
9c63fb59bd Add a script that verifies OTA package signature.
Currently it supports verifying packages signed with RSA algorithms
(v1-v4 as in bootable/recovery/verifier.cpp). No support for ECDSA (v5)
signed packages yet.

$ ./build/tools/releasetools/check_ota_package_signature.py \
    bootable/recovery/tests/testdata/testkey_v1.x509.pem \
    bootable/recovery/tests/testdata/otasigned_v1.zip

Package: bootable/recovery/tests/testdata/otasigned_v1.zip
Certificate: bootable/recovery/tests/testdata/testkey_v1.x509.pem
Comment length: 1738
Signed data length: 2269
Use SHA-256: False
Digest: 115e688ec3b77743070b743453e2fc6ce8754484

VERIFIED

Bug: 31523193
Test: Used the tool to verify existing packages (like above).

Change-Id: I71d3569e858c729cb64825c5c7688ededc397aa8
2016-09-16 15:08:40 -07:00