Skip to content

Commit

Permalink
lock to update ctx crtOcspRequest
Browse files Browse the repository at this point in the history
  • Loading branch information
miyazakh committed Jul 25, 2024
1 parent 2119f15 commit 9938dbe
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/tls.c
Original file line number Diff line number Diff line change
Expand Up @@ -3498,7 +3498,13 @@ static int TLSX_CSR_Parse(WOLFSSL* ssl, const byte* input, word16 length,
der.buffer, der.length);
if (ret == 0 &&
request == ssl->ctx->certOcspRequest) {
ssl->ctx->certOcspRequest = NULL;
wolfSSL_Mutex* ocspLock =
&SSL_CM(ssl)->ocsp_stapling->ocspLock;
if (wc_LockMutex(ocspLock) == 0) {
/* the request is ours */
ssl->ctx->certOcspRequest = NULL;
}
wc_UnLockMutex(ocspLock);
}
}
if (ret == 0) {
Expand Down

0 comments on commit 9938dbe

Please sign in to comment.