Fix digest comparison in FindKeyId to use id->id field

WMEMCMP was comparing the computed SHA-256 digest against the
WOLFSSH_AGENT_ID struct pointer instead of the id field within
the struct, causing key lookups by digest to never match.
pull/880/head
Andrew Hutchings 2026-02-23 10:14:21 +00:00
parent 0728d9cac0
commit 6547f04a77
1 changed files with 1 additions and 1 deletions

View File

@ -660,7 +660,7 @@ static WOLFSSH_AGENT_ID* FindKeyId(WOLFSSH_AGENT_ID* id,
if (ret == WS_SUCCESS) {
while (id != NULL &&
WMEMCMP(digest, id, WC_SHA256_DIGEST_SIZE) != 0 &&
WMEMCMP(digest, id->id, WC_SHA256_DIGEST_SIZE) != 0 &&
WMEMCMP(keyBlob, id->keyBlob, keyBlobSz)) {
id = id->next;
}