mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Use VSR to tell libhwtrust_cxx how to validate
The DICE chain specification changes slightly between VSR versions so the VSR is used to select the set of validation rules that should be applied. Test: TH Change-Id: I3697279d9348705a0279736c61e8333720321214
This commit is contained in:
@@ -619,7 +619,7 @@ ErrMsgOr<std::vector<BccEntryData>> verifyProtectedData(
|
||||
}
|
||||
|
||||
// BCC is [ pubkey, + BccEntry]
|
||||
auto bccContents = validateBcc(bcc->asArray(), hwtrust::DiceChain::Kind::kProtectedData);
|
||||
auto bccContents = validateBcc(bcc->asArray(), hwtrust::DiceChain::Kind::kVsr13);
|
||||
if (!bccContents) {
|
||||
return bccContents.message() + "\n" + prettyPrint(bcc.get());
|
||||
}
|
||||
@@ -910,7 +910,7 @@ ErrMsgOr<bytevec> parseAndValidateAuthenticatedRequest(const std::vector<uint8_t
|
||||
}
|
||||
|
||||
// DICE chain is [ pubkey, + DiceChainEntry ].
|
||||
auto diceContents = validateBcc(diceCertChain, hwtrust::DiceChain::Kind::kAuthenticatedMessage);
|
||||
auto diceContents = validateBcc(diceCertChain, hwtrust::DiceChain::Kind::kVsr14);
|
||||
if (!diceContents) {
|
||||
return diceContents.message() + "\n" + prettyPrint(diceCertChain);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user