gnutls_psk_client_get_hint(3)

πŸ’– gnutls_psk_client_get_hint β€” the vibe check for your PSK identity, bestie πŸ’–

okay so real talk, this is a page from the gnutls manual (that's the GNU Transport Layer Security library, the icon herself) and today we're talking about gnutls_psk_client_get_hint, which is an API function. she's giving "let me peek at what the server wants me to be called" energy and honestly? obsessed. πŸŽ€


✨ SYNOPSIS ✨

#include <gnutls/gnutls.h>

const char * gnutls_psk_client_get_hint(gnutls_session_t session);

like, that's the whole thing. one include, one function call, we move. πŸ’…


🌸 ARGUMENTS 🌸

  • gnutls_session_t session β€” bestie this is just a gnutls session. that's it. that's the tea. it's literally "is a gnutls session" and we love that for her, no notes. πŸ¦‹

πŸ’œ DESCRIPTION πŸ’œ

okay so the PSK identity hint is like... the server sliding into your DMs saying "hey, here's a lil hint about which username you might wanna use." it may give the client help in deciding which username to use. so thoughtful. so demure. so mindful. πŸ™ˆ

the way that you should only call this in case of PSK authentication and in case of a client β€” meaning if you're the server, or if you're not doing PSK at all, this is not your moment. read the room, bestie. not everything is for everybody. ✨


πŸ‘‘ NOTE πŸ‘‘

there is no hint in TLS 1.3, so this function will return NULL if TLS 1.3 has been negotiated. like she's simply not participating in TLS 1.3, she said "not my era" and honestly, respect. if you're on TLS 1.3 and you're expecting a hint, you're getting NULL and that's the whole story. periodt. πŸ’€

🫢 RETURNS 🫢

the identity hint of the peer (yay! the lore! πŸŽ€), or NULL in case of an error or if TLS 1.3 is being used.

so basically: hint = slay, NULL = either something went wrong OR you're on TLS 1.3 where hints just don't exist. two very different reasons, same NULL, no cap. ⭐


🌈 SINCE 🌈

2.4.0 β€” she's been iconic since 2.4.0, an elder stateswoman of the PSK game, we stan a legend. πŸ‘‘


😭 REPORTING BUGS 😭

found a bug? don't just suffer in silence, tell the people:

fr fr, they wanna know. πŸ“


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.

(translation: take her, share her, remix her, just keep the receipts. that's the license, bestie, and it's giving generous. πŸ’–)


πŸ”₯ 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/

go read the whole manual, iykyk. the lore is deep and it's worth it. πŸ“šβœ¨


okay that's the page!! this was gnutls 3.8.13 energy, straight from the gnutls manual, and gnutls_psk_client_get_hint(3) says bye bestie, stay encrypted, drink water, and remember: no hint in TLS 1.3. mwah. πŸ’…πŸ’–πŸ¦‹πŸŒΈπŸŽ€

πŸ“¦ where this page comes from