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 agnutls_certificate_credentialstype. the credential vibes. the main character of the args honestly πunsigned int max_bitsβ the number of bits of an acceptable certificate. default is8200. 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 is5. 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 π
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
- 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