From: Dariusz Michaluk Date: Mon, 4 Mar 2024 16:51:01 +0000 (+0100) Subject: Adjust tests to "ECDSA raw/asn1 signature conversion methods" X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F92%2F307092%2F1;p=platform%2Fcore%2Ftest%2Fsecurity-tests.git Adjust tests to "ECDSA raw/asn1 signature conversion methods" If the ECDSA signature is presented in asn1 format, the first byte is always asn1 metadata, it's better to change the last byte, which will always be signature data. Change-Id: I6ec694dc17598f5931ef12ab15701c15138755f0 --- diff --git a/src/ckm/unprivileged/sign-verify.cpp b/src/ckm/unprivileged/sign-verify.cpp index b0f7317c..088e1322 100644 --- a/src/ckm/unprivileged/sign-verify.cpp +++ b/src/ckm/unprivileged/sign-verify.cpp @@ -295,7 +295,7 @@ void signVerify(const KeyAliasPair& aliasPair, verifyExpect(CKMC_ERROR_NONE, aliasPair.pub, pw, message, hash, padding, signature); // modify 1 bit of the signature - signature->data[0] ^= 0x01; + signature->data[signature->size-1] ^= 0x01; // expect verification failure verifyExpect(CKMC_ERROR_VERIFICATION_FAILED,