Topic: What to use with wolfSSL_CTX_SetGenCookie

In openSSL you use

SSL_CTX_set_cookie_generate_cb()

to generate the cookie and

SSL_CTX_set_cookie_verify_cb()

to verify the cookie.  I see in wolfSSL there is a

wolfSSL_CTX_SetGenCookie()

function for generation, but I don't see a function for verification.  Does that happen automatically somewhere?

Share

Re: What to use with wolfSSL_CTX_SetGenCookie

Hi,
This is Anthony again.

In src/tls13.c we have TlsCheckCookie() which is called by RestartHandshakeHashWithCookie() and in turn called by DoTls13ClientHello() when the server state is in SERVER_HELLO_RETRY_REQUEST_COMPLETE.  So, in a sense, yes, it is done automatically as part of the TLS 1.3 handshake protocol.

Warm regards, Anthony

Share

Re: What to use with wolfSSL_CTX_SetGenCookie

That makes sense, thank you Anthony!

Share