Support signature size of 512 bytes
The signature size will be 512 bytes for the payload signed
with 4096 bits RSA key.
Bug: 129163830
Test: generate and verify an OTA
Change-Id: I18710218e4a3a030e257c594f416831cbfa8c041
(cherry picked from commit 3dbe64e9f2e3b1ef9b3eb2b1e7a42e4cb4af1b89)
diff --git a/payload_generator/generate_delta_main.cc b/payload_generator/generate_delta_main.cc
index de0a091..3cb891f 100644
--- a/payload_generator/generate_delta_main.cc
+++ b/payload_generator/generate_delta_main.cc
@@ -63,8 +63,8 @@
bool parsing_successful = base::StringToInt(str, &size);
LOG_IF(FATAL, !parsing_successful) << "Invalid signature size: " << str;
- LOG_IF(FATAL, size != (2048 / 8))
- << "Only signature sizes of 256 bytes are supported.";
+ LOG_IF(FATAL, size != 256 && size != 512)
+ << "Only signature sizes of 256 or 512 bytes are supported.";
signature_sizes->push_back(size);
}