gnutls_ext_get_name2(3)

πŸ’– gnutls_ext_get_name2 β€” the glow-up name-finder ✨

okay bestie, so this one lives in the gnutls manual (section 3, the library-functions girlies πŸ’…) and it's genuinely one of the cutest little helpers in the whole TLS toolbox. fr fr.


🌸 NAME 🌸

gnutls_ext_get_name2 β€” it's the API function that turns a TLS extension's numeric ID into a string you can actually read with your human eyes πŸ‘€


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/gnutls.h>

const char * gnutls_ext_get_name2(gnutls_session_t session, unsigned int
tls_id, gnutls_ext_parse_type_t parse_point);

like. look at her. three arguments, returns a const char *. iconic behavior honestly 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_session_t session β€” a gnutls_session_t opaque pointer. yeah she's opaque, we don't peer inside, we just pass her along πŸ’œ
  • unsigned int tls_id β€” is a TLS extension numeric ID. the raw number, the unglamorous digits, the before-picture πŸ“Ÿ
  • gnutls_ext_parse_type_t parse_point β€” the parse type of the extension. yes bestie, the parse point matters, it's part of the vibe check πŸ”

✨ DESCRIPTION ✨

Convert a TLS extension numeric ID to a printable string.

that's it. that's the whole thing. she takes the number, she hands you back something you can actually print. no cap, sometimes the simplest girls are the most useful 🌈


πŸ’« RETURNS πŸ’«

a pointer to a string that contains the name of the specified cipher, or NULL.

bestie heads up: it says "cipher" in the original, we are NOT editing that, that is what it says, and also NULL is a real possibility so please check before you go dereferencing her 😭

πŸ› REPORTING BUGS πŸ›

found a bug? do NOT suffer in silence, that's not the energy 🫢


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.

like. free. no royalty. just keep the notice. slay πŸ’…


🌟 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 thing, it's giving encyclopedia but make it TLS πŸ“šβœ¨


gnutls version 3.8.13, dated the same era as that copyright, and this page is literally named gnutls_ext_get_name2(3) β€” mwah, take care of her, she's yours now πŸ’–πŸ¦‹πŸŽ€

πŸ“¦ where this page comes from