Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cb9e5f6f authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Correct the UDS_pub source" into main am: 52ed6c34 am: 75fc02e9

parents 33c59b72 75fc02e9
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -1047,14 +1047,15 @@ ErrMsgOr<bytevec> parseAndValidateAuthenticatedRequest(const std::vector<uint8_t
        return diceContents.message() + "\n" + prettyPrint(diceCertChain);
    }

    auto& udsPub = diceContents->back().pubKey;
    auto udsPub = diceCertChain->get(0)->asMap()->encode();
    auto& kmDiceKey = diceContents->back().pubKey;

    auto error = validateUdsCerts(*udsCerts, udsPub);
    if (!error.empty()) {
        return error;
    }

    auto signedPayload = verifyAndParseCoseSign1(signedData, udsPub, {} /* aad */);
    auto signedPayload = verifyAndParseCoseSign1(signedData, kmDiceKey, {} /* aad */);
    if (!signedPayload) {
        return signedPayload.message();
    }