Skip to content

Commit c1dbbcc

Browse files
committed
add wolfSSLSessionIsSetup so the user can check if
a session ticket has been sent by the server
1 parent 03ed52b commit c1dbbcc

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

tests/api.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47152,6 +47152,7 @@ static int test_wolfSSL_SESSION(void)
4715247152

4715347153
ExpectPtrNE((sess = wolfSSL_get1_session(ssl)), NULL); /* ref count 1 */
4715447154
ExpectPtrNE((sess_copy = wolfSSL_get1_session(ssl)), NULL); /* ref count 2 */
47155+
ExpectIntEQ(wolfSSLSessionIsSetup(sess), 1);
4715547156
#ifdef HAVE_EXT_CACHE
4715647157
ExpectPtrEq(sess, sess_copy); /* they should be the same pointer but without
4715747158
* HAVE_EXT_CACHE we get new objects each time */

wolfssl/ssl.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,6 +1691,7 @@ WOLFSSL_API const char* wolfSSL_SESSION_CIPHER_get_name(const WOLFSSL_SESSION*
16911691
WOLFSSL_API const char* wolfSSL_get_cipher(WOLFSSL* ssl);
16921692
WOLFSSL_API void wolfSSL_sk_CIPHER_free(WOLF_STACK_OF(WOLFSSL_CIPHER)* sk);
16931693
WOLFSSL_API WOLFSSL_SESSION* wolfSSL_get1_session(WOLFSSL* ssl);
1694+
WOLFSSL_API int wolfSSLSessionIsSetup(WOLFSSL_SESSION* session);
16941695

16951696
WOLFSSL_API WOLFSSL_X509* wolfSSL_X509_new(void);
16961697
WOLFSSL_API WOLFSSL_X509* wolfSSL_X509_new_ex(void* heap);

0 commit comments

Comments
 (0)