From 1dc7293b1913ba86b99fa0ce44f1afed11ecdfd5 Mon Sep 17 00:00:00 2001 From: David Garske Date: Thu, 5 Nov 2020 09:31:12 -0800 Subject: [PATCH] Fix the return code. openssl uses void on these, but let's go ahead and do a return code. --- src/ssl.c | 4 ++-- wolfssl/ssl.h | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ssl.c b/src/ssl.c index 3cd5b09a4..a5e866cae 100644 --- a/src/ssl.c +++ b/src/ssl.c @@ -10367,7 +10367,7 @@ int wolfSSL_verify_client_post_handshake(WOLFSSL* ssl) return (ret == 0) ? WOLFSSL_SUCCESS : WOLFSSL_FAILURE; } -void wolfSSL_CTX_set_post_handshake_auth(WOLFSSL_CTX* ctx, int val) +int wolfSSL_CTX_set_post_handshake_auth(WOLFSSL_CTX* ctx, int val) { int ret = wolfSSL_CTX_allow_post_handshake_auth(ctx); if (ret == 0) { @@ -10375,7 +10375,7 @@ void wolfSSL_CTX_set_post_handshake_auth(WOLFSSL_CTX* ctx, int val) } return (ret == 0) ? WOLFSSL_SUCCESS : WOLFSSL_FAILURE; } -void wolfSSL_set_post_handshake_auth(WOLFSSL* ssl, int val) +int wolfSSL_set_post_handshake_auth(WOLFSSL* ssl, int val) { int ret = wolfSSL_allow_post_handshake_auth(ssl); if (ret == 0) { diff --git a/wolfssl/ssl.h b/wolfssl/ssl.h index 1033c8808..4597c2f01 100644 --- a/wolfssl/ssl.h +++ b/wolfssl/ssl.h @@ -977,9 +977,9 @@ WOLFSSL_API void wolfSSL_set_verify_result(WOLFSSL*, long); #if defined(OPENSSL_EXTRA) && !defined(NO_CERTS) && \ defined(WOLFSSL_TLS13) && defined(WOLFSSL_POST_HANDSHAKE_AUTH) -WOLFSSL_API int wolfSSL_verify_client_post_handshake(WOLFSSL*); -WOLFSSL_API void wolfSSL_CTX_set_post_handshake_auth(WOLFSSL_CTX*, int); -WOLFSSL_API void wolfSSL_set_post_handshake_auth(WOLFSSL*, int); +WOLFSSL_API int wolfSSL_verify_client_post_handshake(WOLFSSL*); +WOLFSSL_API int wolfSSL_CTX_set_post_handshake_auth(WOLFSSL_CTX*, int); +WOLFSSL_API int wolfSSL_set_post_handshake_auth(WOLFSSL*, int); #endif WOLFSSL_API void wolfSSL_SetCertCbCtx(WOLFSSL*, void*);