Skip to content

JNI/JSSE: call wolfSSL_sk_X509_pop_free() in WolfSSLX509StoreCtx.getDerCerts()#179

Merged
douzzer merged 1 commit intowolfSSL:masterfrom
cconlon:skpopfree
Mar 30, 2024
Merged

JNI/JSSE: call wolfSSL_sk_X509_pop_free() in WolfSSLX509StoreCtx.getDerCerts()#179
douzzer merged 1 commit intowolfSSL:masterfrom
cconlon:skpopfree

Conversation

@cconlon
Copy link
Copy Markdown
Member

@cconlon cconlon commented Mar 18, 2024

This PR fixes the free function called in WolfSSLX509StoreCtx.getDerCerts() when freeing the WOLFSSL_STACK* allocated with wolfSSL_X509_STORE_GetCerts(WOLFSSL_X509_STORE_CTX*).

wolfSSL_sk_X509_free() just frees the stack structure, where wolfSSL_sk_X509_pop_free() frees each node in the stack then the stack.

WolfSSLX509StoreCtx.getDerCerts() is called inside the WolfSSLInternalVerifyCb class' verifyCallback() method, which will be called when peer verification is conducted inside an SSL/TLS connection with wolfJSSE.

@douzzer douzzer merged commit 9c63b7f into wolfSSL:master Mar 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants