Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 1 commit into from
Mar 30, 2024

Conversation

cconlon
Copy link
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
36 checks passed
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