libfec: return raw and corrected verity metadata signatures
Since it's not possible for libfec to identify whether the signature
field was successfully corrected, return both and allow the caller to
validate either signature.
Bug: 28943429
Change-Id: Ie913c21ba1d07d6df4c6feeb7226b2ec963f4d19
diff --git a/libfec/fec_open.cpp b/libfec/fec_open.cpp
index c1d4afd..0e41bf4 100644
--- a/libfec/fec_open.cpp
+++ b/libfec/fec_open.cpp
@@ -460,7 +460,10 @@
data->disabled = f->verity.disabled;
data->data_size = f->data_size;
- memcpy(data->signature, f->verity.header.signature, sizeof(data->signature));
+ memcpy(data->signature, f->verity.header.signature,
+ sizeof(data->signature));
+ memcpy(data->ecc_signature, f->verity.ecc_header.signature,
+ sizeof(data->ecc_signature));
data->table = f->verity.table;
data->table_length = f->verity.header.length;