File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -283,6 +283,13 @@ WOLFSSL_SESSION* wolfSSL_get1_session(WOLFSSL* ssl)
283283 return sess ;
284284}
285285
286+ /* session is a private struct, return if it is setup or not */
287+ WOLFSSL_API int wolfSSL_SessionIsSetup (WOLFSSL_SESSION * session )
288+ {
289+ if (session != NULL )
290+ return session -> isSetup ;
291+ return 0 ;
292+ }
286293
287294/*
288295 * Sets the session object to use when establishing a TLS/SSL session using
Original file line number Diff line number Diff line change @@ -47260,6 +47260,7 @@ static int test_wolfSSL_SESSION(void)
4726047260
4726147261 ExpectPtrNE((sess = wolfSSL_get1_session(ssl)), NULL); /* ref count 1 */
4726247262 ExpectPtrNE((sess_copy = wolfSSL_get1_session(ssl)), NULL); /* ref count 2 */
47263+ ExpectIntEQ(wolfSSL_SessionIsSetup(sess), 1);
4726347264#ifdef HAVE_EXT_CACHE
4726447265 ExpectPtrEq(sess, sess_copy); /* they should be the same pointer but without
4726547266 * HAVE_EXT_CACHE we get new objects each time */
Original file line number Diff line number Diff line change @@ -1696,6 +1696,7 @@ WOLFSSL_API const char* wolfSSL_SESSION_CIPHER_get_name(const WOLFSSL_SESSION*
16961696WOLFSSL_API const char * wolfSSL_get_cipher (WOLFSSL * ssl );
16971697WOLFSSL_API void wolfSSL_sk_CIPHER_free (WOLF_STACK_OF (WOLFSSL_CIPHER )* sk );
16981698WOLFSSL_API WOLFSSL_SESSION * wolfSSL_get1_session (WOLFSSL * ssl );
1699+ WOLFSSL_API int wolfSSL_SessionIsSetup (WOLFSSL_SESSION * session );
16991700
17001701WOLFSSL_API WOLFSSL_X509 * wolfSSL_X509_new (void );
17011702WOLFSSL_API WOLFSSL_X509 * wolfSSL_X509_new_ex (void * heap );
You can’t perform that action at this time.
0 commit comments