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

Check the return code when calling post handshake auth functions #7716

Merged
merged 1 commit into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions examples/client/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -3585,8 +3585,11 @@ THREAD_RETURN WOLFSSL_THREAD client_test(void* args)
#endif
#endif
#if defined(WOLFSSL_TLS13) && defined(WOLFSSL_POST_HANDSHAKE_AUTH)
if (postHandAuth)
wolfSSL_CTX_allow_post_handshake_auth(ctx);
if (postHandAuth) {
if (wolfSSL_CTX_allow_post_handshake_auth(ctx) != 0) {
err_sys("unable to support post handshake auth");
}
}
#endif

if (benchmark) {
Expand Down
8 changes: 6 additions & 2 deletions examples/server/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -3713,8 +3713,12 @@ THREAD_RETURN WOLFSSL_THREAD server_test(void* args)
((usePskPlus) ? WOLFSSL_VERIFY_FAIL_EXCEPT_PSK :
WOLFSSL_VERIFY_FAIL_IF_NO_PEER_CERT), 0);

wolfSSL_request_certificate(ssl);

if (wolfSSL_request_certificate(ssl) != WOLFSSL_SUCCESS) {
LOG_ERROR("Request for post-hs certificate failed\n");
}
else {
LOG_ERROR("Successfully requested post-hs certificate\n");
}
}

#endif
Expand Down