summaryrefslogtreecommitdiffstats
path: root/verifier.cpp (unfollow)
Commit message (Collapse)AuthorFilesLines
2016-11-03Revert "Revert "Some cleanups to recovery.""Tao Bao1-4/+3
This reverts commit 8584fcf677dd45b30121bd0490b06297e6be1871. This CL re-lands commit c0319b60f56d445c2d1c74f551e01f069b028fe6. The "stage" and "reason" variables are now declared as global by dropping the static qualifier, because they may be used by vendor recovery libraries. Test: lunch aosp_angler-userdebug; mmma bootable/recovery Test: lunch aosp_dragon-userdebug; mmma bootable/recovery Change-Id: I252c346f450079478cff22bbff01590b8ab2e2b3
2016-10-27Revert "Some cleanups to recovery."Dan Albert1-3/+4
This reverts commit c0319b60f56d445c2d1c74f551e01f069b028fe6. Reason for revert: Broke builds. Change-Id: I82aa880b83de5ae6c36fd7567cb001920559a972
2016-10-26Some cleanups to recovery.Tao Bao1-4/+3
- Remove the duplicate gCurrentUI variable in recovery.cpp; - Refactor the load/save of locale functions; - Clean up ui_print() to get rid of 256-byte buffer limit; - Declare ui in common.h; - Move the typedef of Volume into roots.h. Test: Build and boot into recovery image. Change-Id: Ia28c116858ca754133127a5ff9c722af67ad55b7
2016-10-18Replace minzip with libziparchiveTianjie Xu1-1/+1
Clean up the duplicated codes that handle the zip files in bootable/recovery; and rename the library of the remaining utility functions to libotautil. Test: Update package installed successfully on angler. Bug: 19472796 Change-Id: Iea8962fcf3004473cb0322b6bb3a9ea3ca7f679e
2016-09-01Switch recovery to libbase loggingTianjie Xu1-25/+25
Clean up the recovery image and switch to libbase logging. Bug: 28191554 Change-Id: Icd999c3cc832f0639f204b5c36cea8afe303ad35 Merged-In: Icd999c3cc832f0639f204b5c36cea8afe303ad35
2016-04-20recovery: Dump the signature in the zip package.Tao Bao1-2/+15
We have been occasionally seeing "signature verification failed" error message when applying an update. Make more verbose output to help debugging. Bug: 28246534 Change-Id: Id83633adc9b86b3fd36abbb504e430f0816f12e4
2016-04-20Decrease OTA package verification times further.Elliott Hughes1-4/+4
Timing from Nexus 5X: 89 MiB OTA update package: 1.4 s -> 0.6 s (decreased by 57%) 1196 MiB OTA update package: 8.0 s -> 7.5 s (decreased by 6%) Bug: http://b/28135231 Change-Id: Id91f2ad15df2bffb9f8a4b4ec5a57657a02847ec
2016-04-16Fix IWYU errors.David Benjamin1-0/+1
This fixes build errors with BoringSSL master. (The cpp file uses functions from bn.h and neither it nor the header includes it.) Change-Id: If7f38aa0b931aa7940079bc006c7283b31f3b774
2016-04-14Use BoringSSL instead of mincrypt to speed up package verification.Elliott Hughes1-111/+209
This changes the verification code in bootable/recovery to use BoringSSL instead of mincrypt. Cherry-pick of 452df6d99c81c4eeee3d2c7b2171901e8b7bc54a, with merge conflict resolution, extra logging in verifier.cpp, and an increase in the hash chunk size from 4KiB to 1MiB. Bug: http://b/28135231 Change-Id: I1ed7efd52223dd6f6a4629cad187cbc383d5aa84
2016-04-06Convert recovery to use BoringSSL instead of mincrypt.Mattias Nissler1-107/+203
This changes the verification code in bootable/recovery to use BoringSSL instead of mincrypt. Change-Id: I37b37d84b22e81c32ac180cd1240c02150ddf3a7
2016-02-03recovery: Refactor verifier and verifier_test.Tao Bao1-141/+124
Move to using std::vector and std::unique_ptr to manage key certificates to stop memory leaks. Bug: 26908001 Change-Id: Ia5f799bc8dcc036a0ffae5eaa8d9f6e09abd031c
2015-01-28Add missing includes.Elliott Hughes1-2/+3
Change-Id: I0737456e0221ebe9cc854d65c95a7d37d0869d56
2014-03-14Recovery 64-bit compile issuesMark Salyzyn1-7/+7
Change-Id: I92d5abd1a628feab3b0246924fab7f97ba3b9d34
2014-01-16do verification and extraction on memory, not filesDoug Zongker1-55/+15
Changes minzip and recovery's file signature verification to work on memory regions, rather than files. For packages which are regular files, install.cpp now mmap()s them into memory and then passes the mapped memory to the verifier and to the minzip library. Support for files which are raw block maps (which will be used when we have packages written to encrypted data partitions) is present but largely untested so far. Bug: 12188746 Change-Id: I12cc3e809834745a489dd9d4ceb558cbccdc3f71
2013-10-10Add support for ECDSA signaturesKenny Root1-32/+198
This adds support for key version 5 which is an EC key using the NIST P-256 curve parameters. OTAs may be signed with these keys using the ECDSA signature algorithm with SHA-256. Change-Id: Id88672a3deb70681c78d5ea0d739e10f839e4567
2013-09-25verifier: update to support certificates using SHA-256Doug Zongker1-17/+63
(cherry picked from commit bac7fba02763ae5e78e8e4ba0bea727330ad953e) Change-Id: I01c38d7fea088622a8b0bbf2c833fa2d969417af
2013-04-10verifier: update to support certificates using SHA-256Doug Zongker1-17/+63
Change-Id: Ifd5a29d459acf101311fa1c220f728c3d0ac2e4e
2012-11-02move key loading to verifier codeDoug Zongker1-0/+102
Add an option to verifier_test to load keys from a file, the way the recovery does. Change-Id: Icba0e391164f2c1a9fefeab4b0bcb878e91d17b4
2011-10-31refactor ui functions into a classDoug Zongker1-2/+4
Move all the functions in ui.c to be members of a ScreenRecoveryUI class, which is a subclass of an abstract RecoveryUI class. Recovery then creates a global singleton instance of this class and then invoke the methods to drive the UI. We use this to allow substitution of a different RecoveryUI implementation for devices with radically different form factors (eg, that don't have a screen). Change-Id: I76bdd34eca506149f4cc07685df6a4890473f3d9
2011-10-31turn recovery into a C++ binaryDoug Zongker1-6/+7
Change-Id: I423a23581048d451d53eef46e5f5eac485b77555
2011-10-28turn recovery into a C++ binaryDoug Zongker1-184/+0
Change-Id: I68a67a4c8edec9a74463b3d4766005ce27b51316
2011-03-15log which key a package verified against in recoveryDoug Zongker1-1/+1
Change-Id: I0d91b715d1eb9e45e2fce54bb93ba0abef92727e
2010-01-13android-2.1_r1 snapshotThe Android Open Source Project1-1/+1
2009-12-10add a simple unit test for the OTA package verifierDoug Zongker1-2/+2
2009-12-09Security: Fix typo in recovery EOCD detection.Steve Kondik1-1/+1
This issue results in the ability to modify the contents of a signed OTA recovery image.
2009-12-09fix cut-and-paste error in verifierDoug Zongker1-1/+1
Oops.
2009-11-13eclair snapshotJean-Baptiste Queru1-308/+131
2009-08-17do not merge: cherry-picked 60151a295ccf726238dc47456d80b427db6d6a38 from master branchDoug Zongker1-308/+131
2009-08-15verify whole-file signature instead of jarsigner signaturesDoug Zongker1-308/+131
In recovery, verify a signature that covers the entire zip file, instead of using the jarsigner format to verify individual files. Bug: 1328985
2009-03-04auto import from //depot/cupcake/@135843The Android Open Source Project1-0/+361
2009-03-04auto import from //depot/cupcake/@135843The Android Open Source Project1-361/+0
2008-12-18Code drop from //branches/cupcake/...@124589The Android Open Source Project1-1/+3