Merge pull request #932 from yosuke-wolfssl/f_2075

Fix FingerprintKey
pull/934/head
JacobBarthelmeh 2026-04-17 09:36:25 -06:00 committed by GitHub
commit 6638054582
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 3 deletions

View File

@ -214,10 +214,12 @@ static int FingerprintKey(const byte* pubKey, word32 pubKeySz, char* out)
int ret;
ret = wc_InitSha256(&sha);
if (ret == 0)
if (ret == 0) {
ret = wc_Sha256Update(&sha, pubKey, pubKeySz);
if (ret == 0)
ret = wc_Sha256Final(&sha, digest);
if (ret == 0)
ret = wc_Sha256Final(&sha, digest);
wc_Sha256Free(&sha);
}
if (ret == 0)
ret = Base64_Encode_NoNl(digest, sizeof(digest), (byte*)fp, &fpSz);