Topic: Is it possible to use session ticket to optmize DTLS resumption ?

Hi, I'm trying to use session ticket to do dtls resumption. I add some function in the C# wrapper so that I can call these function in C#, but it just doesn't work. After reading some source code, I found out that the "ssl->session.ticketLen" in get_SessionTicket will always be zero, which I think is because I don't trigger the support on session ticket of server correctly. My current code look like:

Client:

wolfssl_CTX_UseSessionTicket(ctx);

...

a connect

...

wolfssl_get_SessionTicket(ssl, ticket, ref ticketLen);

...

wolfssl_set_SessionTicket(ssl, ticket, ticketLen);


Server:

wolfssl.CTX_UseSessionTicket(ctx);

// no other change


Thanks smile

Share

Re: Is it possible to use session ticket to optmize DTLS resumption ?

Hello,

The server uses a callback to set up a session ticket, which will then be sent to the client (if requested using `wolfssl_CTX_UseSessionTicket` API, which is only relevant to the client). You can review the example code.

`wolfSSL_CTX_set_TicketEncCb` API:
https://github.com/wolfSSL/wolfssl/blob … er.c#L2076

example callback:
https://github.com/wolfSSL/wolfssl/blob … st.h#L4052

Kind regards,
Eric @ wolfSSL Support

Re: Is it possible to use session ticket to optmize DTLS resumption ?

Thanks for your kind support, I'll try to make it works.

Share