diff options
author | Tianjie Xu <xunchang@google.com> | 2019-03-27 19:21:01 +0100 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2019-03-27 19:21:01 +0100 |
commit | 3de9ee62b84586523d1fa78129d36661d7d09a2b (patch) | |
tree | 2be8560dae4dfc7cf748d295d7c57da9a8973de7 /verifier.cpp | |
parent | Merge "Move out the code to parse block map in MemMap" (diff) | |
parent | Merge "Allow RSA 4096 key in package verification" (diff) | |
download | android_bootable_recovery-3de9ee62b84586523d1fa78129d36661d7d09a2b.tar android_bootable_recovery-3de9ee62b84586523d1fa78129d36661d7d09a2b.tar.gz android_bootable_recovery-3de9ee62b84586523d1fa78129d36661d7d09a2b.tar.bz2 android_bootable_recovery-3de9ee62b84586523d1fa78129d36661d7d09a2b.tar.lz android_bootable_recovery-3de9ee62b84586523d1fa78129d36661d7d09a2b.tar.xz android_bootable_recovery-3de9ee62b84586523d1fa78129d36661d7d09a2b.tar.zst android_bootable_recovery-3de9ee62b84586523d1fa78129d36661d7d09a2b.zip |
Diffstat (limited to 'verifier.cpp')
-rw-r--r-- | verifier.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/verifier.cpp b/verifier.cpp index 68a011e0d..08d852b37 100644 --- a/verifier.cpp +++ b/verifier.cpp @@ -373,8 +373,8 @@ bool CheckRSAKey(const std::unique_ptr<RSA, RSADeleter>& rsa) { const BIGNUM* out_e; RSA_get0_key(rsa.get(), &out_n, &out_e, nullptr /* private exponent */); auto modulus_bits = BN_num_bits(out_n); - if (modulus_bits != 2048) { - LOG(ERROR) << "Modulus should be 2048 bits long, actual: " << modulus_bits; + if (modulus_bits != 2048 && modulus_bits != 4096) { + LOG(ERROR) << "Modulus should be 2048 or 4096 bits long, actual: " << modulus_bits; return false; } |