GNUTLS_CERTIFICATE_SET_VERIFY_LIMITS(3)

πŸŽ€ gnutls_certificate_set_verify_limits β€” bestie edition πŸŽ€

okay so. you're in the gnutls manual (section 3, the library functions one, iykyk) and you clicked on gnutls_certificate_set_verify_limits. buckle up, this one is short but it is important.


✨ NAME ✨

gnutls_certificate_set_verify_limits β€” it's an API function, bestie πŸ’–


🌸 SYNOPSIS 🌸

#include <gnutls/gnutls.h>

void
gnutls_certificate_set_verify_limits(gnutls_certificate_credentials_t
res, unsigned int max_bits, unsigned int max_depth);

like. that's the whole thing. three args, returns nothing (void), very demure, very mindful ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_certificate_credentials_t res β€” this is a gnutls_certificate_credentials type. the credential vibes. the main character of the args honestly πŸ‘‘
  • unsigned int max_bits β€” the number of bits of an acceptable certificate. default is 8200. yeah. eight thousand two hundred. that's not a typo, that's the actual default, no cap πŸ’…
  • unsigned int max_depth β€” the maximum depth of the verification of a certificate chain. default is 5. five. that's it. that's the depth 🫢

πŸ’– DESCRIPTION πŸ’–

so this function sets some upper limits for the default verification function, gnutls_certificate_verify_peers2(). why? to avoid denial of service attacks, periodt. like, someone could try to hand you a certificate so absurd that your verifier just. dies. and we are NOT doing that 🌸

and here's the cute part: you can set them to zero to disable limits. zero means no limits, go wild, live your truth. (but like… that's a choice. a choice with consequences. just saying πŸ™ˆ)

⚠️ setting these to 0 literally disables the limits, so if you do that and something bad happens, that's between you and your threat model, bestie 😭

πŸ’€ REPORTING BUGS πŸ’€

found a bug? not me, not you, but if you did β€” report it 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. (iconic behaviour honestly, ate and left no crumbs πŸ’…)


🌈 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, babe. go forth and set your limits responsibly πŸ¦‹βœ¨

this was gnutls version 3.8.13 β€” mwah, love you, bye πŸ’–πŸŽ€

πŸ“¦ where this page comes from