Skip to content

Commit 83f5644

Browse files
committed
ocsp: Fix OcspEncodeCertID SetAlgoID return check
1 parent 814f0f8 commit 83f5644

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ocsp.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -859,8 +859,8 @@ static int OcspEncodeCertID(WOLFSSL_OCSP_CERTID* id, byte* output,
859859

860860
ret = SetAlgoID(id->hashAlgoOID, ((output != NULL) ? output + idx : output),
861861
oidHashType, 0);
862-
if (ret < 0)
863-
return ret;
862+
if (ret <= 0)
863+
return -1;
864864
idx += ret;
865865

866866
/* issuerNameHash */

0 commit comments

Comments
 (0)