gnutls_kx_get(3)

πŸ’… gnutls_kx_get β€” the manual page, but make it cute

okay so this is a page from the gnutls manual, bestie, and it's about one tiny little function that tells you which key exchange you and your TLS buddy just used. let's get into it πŸ¦‹


✨ NAME ✨

gnutls_kx_get β€” literally just an API function, that's it, that's the name πŸ’–


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

gnutls_kx_algorithm_t gnutls_kx_get(gnutls_session_t session);

πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_session_t session β€” bestie this is a gnutls_session_t type. that's the whole vibe. it's your session, hand it over πŸ’…

πŸ‘‘ DESCRIPTION πŸ‘‘

Get the currently used key exchange algorithm. like, which KX is this session actually riding with right now? that one. 🫢

This function will return GNUTLS_KX_ECDHE_RSA, or GNUTLS_KX_DHE_RSA under TLS 1.3, to indicate an elliptic curve DH key exchange or a finite field one. so under TLS 1.3 it's not gonna hand you the exact flavor of curve, it just says "ECDHE_RSA" or "DHE_RSA" and calls it a day 😭

The precise group used is available by calling gnutls_group_get() instead. so if you want the actual group, not the vibe-level summary, go ask gnutls_group_get(). periodt. πŸ’…

⭐ RETURNS ⭐

the key exchange algorithm used in the last handshake, a gnutls_kx_algorithm_t value. last handshake, not the current one, not a future one, the last one. iykyk 🌈


😭 REPORTING BUGS 😭

found something cursed? spill it to <bugs@gnutls.org>. they wanna know fr fr πŸ’€

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. so like, share it, remix it, whatever β€” just keep the copyright notice and this notice intact, bestie. no cap. πŸŽ€


πŸ¦‹ 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/


and that's the whole page, bestie!! this was gnutls 3.8.13, page gnutls_kx_get(3), and honestly? iconic. go check your key exchange, you deserve to know. mwah πŸ’–βœ¨

πŸ“¦ where this page comes from