gnutls_dh_get_peers_public_bits(3)
β¨ gnutls_dh_get_peers_public_bits(3) β¨
okay bestie, welcome to the gnutls manual section 3 π this one is short and sweet, and it's literally just about peeking at how big your Diffie-Hellman public key is. iconic behavior, no notes. π
πΈ NAME πΈ
gnutls_dh_get_peers_public_bits β an API function, and yeah that's the whole name, she's self-explanatory π
π¦ SYNOPSIS π¦
#include <gnutls/gnutls.h>
int gnutls_dh_get_peers_public_bits(gnutls_session_t session);
like. that's it. that's the whole vibe. one include, one function call. we love a low-effort slay π«Ά
π ARGUMENTS π
gnutls_session_t sessionβ bestie this is a gnutls session. the session. the one you've been doing your handshakes in. give her here. π
β DESCRIPTION β
so what does this actually do?? it gets the Diffie-Hellman public key bit size π₯ that's the number of bits in the public key used in your DH exchange.
and the cute part: it works for both anonymous and ephemeral Diffie-Hellman. so no matter which flavor of DH you're running, this function has you covered. versatile queen. π
π RETURNS π
- the public key bit size that was used in the last Diffie-Hellman key exchange with the peer π
- or, if things went sideways, a negative error code π (yes, negative, so check your return value, don't just assume it's a bit count, i am begging you)
bestie fr fr: if you get a negative number back, that is NOT a key size, that is an error. do not pass go. do not collect $200. check the error. π
π REPORTING BUGS π
found a bug? (rude of it, honestly.) report bugs to <bugs@gnutls.org>. π§
home page: https://www.gnutls.org π
π COPYRIGHT π
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. π«Ά (basically: be nice, keep the notice, you're good.)
π 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 version 3.8.13, brought to you by the gnutls gang, and yeah she's got that gnutls_dh_get_peers_public_bits(3) energy through and through π go forth, check those bits, and hydrate!! πΈπ
π
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms