gnutls_dtls_prestate_set(3)

πŸ’– gnutls_dtls_prestate_set(3) πŸ’–

okay bestie so this is a page from the gnutls manual β€” yes, that gnutls, the TLS/DTLS library β€” and it's about one very specific little function that does exactly one very specific little job. no cap. let's get into it πŸ¦‹


✨ NAME ✨

gnutls_dtls_prestate_set β€” it's an API function, that's the whole name-vibe 🌸


✨ SYNOPSIS ✨

#include <gnutls/dtls.h>

void gnutls_dtls_prestate_set(gnutls_session_t session,
gnutls_dtls_prestate_st * prestate);

✨ ARGUMENTS ✨

  • gnutls_session_t session β€” a new session πŸ’… like, freshly minted, brand new, never been used before
  • gnutls_dtls_prestate_st * prestate β€” this lil guy contains the client's prestate πŸ‘‘

✨ DESCRIPTION ✨

so the way this works is β€” this function will associate the prestate that you got from the cookie authentication with the client, and hook it up to the newly established session. matchmaker behaviour, honestly 🫢

and listen, the order MATTERS, it's giving choreography:

  • this function must be called after a successful gnutls_dtls_cookie_verify()
  • and it should be succeeded by the actual DTLS handshake using gnutls_handshake()

so it's like: verify the cookie β†’ set the prestate β†’ do the handshake. in that order, bestie. periodt πŸ’€


✨ SINCE ✨

3.0 β€” this one's been around since 3.0, an OG 🌈


✨ REPORTING BUGS ✨

found a bug? tell the gnutls girlies about it:


Copyright Β© 2001-2023 Free Software Foundation, Inc., and others.

Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved.

legal said what it said and we respect it πŸ’œ

✨ SEE ALSO ✨

The full documentation for gnutls is maintained as a Texinfo manual. If the /usr/share/doc/gnutls/ directory does not contain the HTML form visit

https://www.gnutls.org/manual/

like, go read the whole thing, it's iconic πŸ“šβœ¨


and that's the page!! this was gnutls, version 3.8.13, and honestly? slay. go verify those cookies and set that prestate, bestie, you've got this πŸ’…πŸŽ€πŸ’–

πŸ“¦ where this page comes from