mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-29 18:27:29 +02:00
Adding wolfSSL_CTX_get_TicketEncCtx
This commit is contained in:
@ -11214,6 +11214,27 @@ WOLFSSL_API int wolfSSL_CTX_set_TicketHint(WOLFSSL_CTX* ctx, int);
|
||||
*/
|
||||
WOLFSSL_API int wolfSSL_CTX_set_TicketEncCtx(WOLFSSL_CTX* ctx, void*);
|
||||
|
||||
/*!
|
||||
\brief This function gets the session ticket encrypt user context for the
|
||||
callback. For server side use.
|
||||
|
||||
\return userCtx will be returned upon successfully getting the session.
|
||||
\return NULL will be returned on failure. This is caused by
|
||||
passing invalid arguments to the function, or when the user context has
|
||||
not been set.
|
||||
|
||||
\param ctx pointer to the WOLFSSL_CTX object, created
|
||||
with wolfSSL_CTX_new().
|
||||
|
||||
_Example_
|
||||
\code
|
||||
none
|
||||
\endcode
|
||||
|
||||
\sa wolfSSL_CTX_set_TicketEncCtx
|
||||
*/
|
||||
WOLFSSL_API void* wolfSSL_CTX_get_TicketEncCtx(WOLFSSL_CTX* ctx);
|
||||
|
||||
/*!
|
||||
\ingroup IO
|
||||
|
||||
|
@ -2893,6 +2893,14 @@ int wolfSSL_CTX_set_TicketEncCtx(WOLFSSL_CTX* ctx, void* userCtx)
|
||||
return WOLFSSL_SUCCESS;
|
||||
}
|
||||
|
||||
/* get user context - returns userCtx on success, NULL on failure */
|
||||
void* wolfSSL_CTX_get_TicketEncCtx(WOLFSSL_CTX* ctx)
|
||||
{
|
||||
if (ctx == NULL)
|
||||
return NULL;
|
||||
|
||||
return ctx->ticketEncCtx;
|
||||
}
|
||||
#endif /* !NO_WOLFSSL_SERVER */
|
||||
|
||||
#if !defined(NO_WOLFSSL_CLIENT)
|
||||
|
@ -3261,6 +3261,7 @@ WOLFSSL_API int wolfSSL_CTX_set_TicketEncCb(WOLFSSL_CTX* ctx,
|
||||
SessionTicketEncCb);
|
||||
WOLFSSL_API int wolfSSL_CTX_set_TicketHint(WOLFSSL_CTX* ctx, int);
|
||||
WOLFSSL_API int wolfSSL_CTX_set_TicketEncCtx(WOLFSSL_CTX* ctx, void*);
|
||||
WOLFSSL_API void* wolfSSL_CTX_get_TicketEncCtx(WOLFSSL_CTX* ctx);
|
||||
|
||||
#endif /* NO_WOLFSSL_SERVER */
|
||||
|
||||
|
Reference in New Issue
Block a user