gnutls_srp_set_prime_bits(3)

✨ gnutls_srp_set_prime_bits ✨

okay bestie, gather round, because we're talking about a lil function from the gnutls manual and honestly it's giving "small but mighty" πŸ’…


πŸ’– NAME πŸ’–

gnutls_srp_set_prime_bits β€” it's an API function, no cap 🫢


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

void gnutls_srp_set_prime_bits(gnutls_session_t session, unsigned int
bits);

like, that's the whole vibe. two args, returns nothing, just does its thing ✨


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_session_t session β€” bestie this is literally just a gnutls_session_t type. that's it. that's the arg πŸ’œ
  • unsigned int bits β€” and this one? it's the number of bits. the bits!! the whole point!! πŸ”₯

πŸ¦‹ DESCRIPTION πŸ¦‹

so what does it actually DO. okay so this function sets the minimum accepted number of bits, for use in an SRP key exchange. 🧚

and listen β€” if you pass zero, the default 2048 bits gets used. iconic behavior honestly.

on the client side, it sets the minimum accepted number of bits. so if a server sends a prime with less bits than that... 😭 the handshake is gonna return GNUTLS_E_RECEIVED_ILLEGAL_PARAMETER. rude of them tbh. not the vibe. 🚫

and this function? has no effect in server side. like, zero. none. it's a client-side main character, periodt. πŸ‘‘

⭐ SINCE ⭐

2.6.0 β€” been here since way back, a real OG 🌈


πŸ’€ REPORTING BUGS πŸ’€

found a bug? not me being shocked πŸ™ˆ report it to <bugs@gnutls.org> 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 yes bestie, you can share it, just keep the receipts ✨)


🌈 SEE ALSO 🌈

the full documentation for gnutls is maintained as a Texinfo manual. and if the /usr/share/doc/gnutls/ directory does NOT contain the HTML form β€” tragic, I know β€” then visit:

https://www.gnutls.org/manual/


okay that's the whole page, you ate that πŸ’… this was gnutls version 3.8.13, and yeah the footer said gnutls_srp_set_prime_bits(3) again because manpages love a lil encore πŸŽ€ bye bestie, go set some prime bits πŸ’–

πŸ“¦ where this page comes from