gnutls_psk_set...params_function(3)

✨ NAME ✨

gnutls_psk_set_server_params_function β€” bestie, it's an API function πŸ’…

This one lives in the gnutls manual, and it's giving "old-school callback setter" energy. Come sit with me, we're gonna go through it together 🫢


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

void
gnutls_psk_set_server_params_function(gnutls_psk_server_credentials_t
res, gnutls_params_function * func);

Okay so that's the whole vibe right there. Two params, returns nothing, no cap. ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_psk_server_credentials_t res β€” literally is a gnutls_certificate_credentials_t type. Yes bestie, that's what the docs say, I'm just the messenger πŸ™ˆ
  • gnutls_params_function * func β€” the function that's gonna get called. The callback. The main character of this whole operation πŸ‘‘

πŸ¦‹ DESCRIPTION πŸ¦‹

So here's the tea β˜•: this function sets a callback so that the server can go get the Diffie-Hellman parameters for PSK authentication. That's the whole job. That's it. 🫑

And the callback? It should return GNUTLS_E_SUCCESS (that's 0) on success. Zero means slay, anything else means 😭

Lowkey important: success = GNUTLS_E_SUCCESS = 0. Remember it. Your callback needs to come home with a zero.

πŸ’€ DEPRECATED πŸ’€

Not me having to tell you this... but this function is unnecessary and discouraged on GnuTLS 3.6.0 or later. Yeah. It's giving legacy. πŸ™ˆ

Since 3.6.0, DH parameters are negotiated following RFC7919, so you genuinely don't need to hand-feed them anymore. Periodt.


🌈 REPORTING BUGS 🌈

Found something cursed? Report bugs to <bugs@gnutls.org>.

Home page is right here: https://www.gnutls.org β€” go look, it's iconic.


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. So like, take it, share it, just keep the receipts bestie πŸ’–


⭐ 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, then bestie you gotta go visit:

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

That's the whole page, no crumbs left behind πŸ“


That's a wrap! πŸ’… This was gnutls 3.8.13, the gnutls manual, gnutls_psk_set...params_function(3) β€” mwah, go forth and callback responsibly βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from