gnutls_ciphersuite_get(3)

πŸ’– gnutls_ciphersuite_get β€” the glow-up name reveal πŸ’–

okay bestie, we're in the gnutls manual, and this page is literally just about one little function that tells you which ciphersuite your TLS session actually agreed on. no cap. it's giving "who did you end up with at the end of the handshake" energy. let's go πŸ¦‹


✨ NAME ✨

gnutls_ciphersuite_get β€” API function πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

const char * gnutls_ciphersuite_get(gnutls_session_t session);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_session_t session β€” bestie, this is a gnutls_session_t type. that's it. that's the whole vibe. she's a session, she's got secrets, and we're about to peek at her ciphersuite.

πŸ¦‹ DESCRIPTION πŸ¦‹

so the whole point of this function? it gets you the canonical name of the negotiated TLS ciphersuite. iconic behaviour, honestly.

and the names it hands back match the IANA registry, with exactly one exception (yes, one, and she's special):

TLS_DHE_DSS_RC4_128_SHA { 0x00, 0x66 }

which is reserved for compatibility. periodt. that's the one name that doesn't play by IANA rules, and she's grandfathered in, we respect her πŸ™ˆ

lowkey important: if you want a detailed description of the current ciphersuite instead of just the name, the recommended move is gnutls_session_get_desc(). use that one when you want the full story, not just the label. πŸ’–

⭐ RETURNS ⭐

it returns a string with the canonical name of a TLS ciphersuite β€” slay β€” or NULL if the handshake is not completed. so if you get nothing back, bestie, the handshake hasn't finished yet. no handshake, no name. 😭


🌈 SINCE 🌈

3.7.4 β€” so she's been here since 3.7.4, and she ate from day one πŸ‘‘


πŸ’œ REPORTING BUGS πŸ’œ

found something cursed? report bugs to <bugs@gnutls.org>. 🫢

home page: https://www.gnutls.org


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. (yes, you can share her around, just keep the receipts πŸ’…)


πŸ‘‘ 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/

aaaand that's the whole page, bestie!! πŸŽ€βœ¨ this was gnutls version 3.8.13, and the page you just read is gnutls_ciphersuite_get(3). ty for coming to my ted talk, go get that canonical name, iykyk πŸ’–πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from