GNUTLS_X509_NAME_CONSTRAINTS_CHECK_CRT(3)
π gnutls_x509_name_constraints_check_crt β like, the whole vibe β¨
okay bestie, we're deep in the gnutls manual here (that's the GnuTLS library's docs, and yes this page lives in section 3 of the manual, aka the library-functions section, iykyk). This one's called gnutls_x509_name_constraints_check_crt and it's an API function. Let's get into it π«Ά
πΈ SYNOPSIS πΈ
#include <gnutls/x509.h>
unsigned
gnutls_x509_name_constraints_check_crt(gnutls_x509_name_constraints_t
nc, gnutls_x509_subject_alt_name_t type, gnutls_x509_crt_t cert);
periodt. that's the whole signature, don't touch it π
π ARGUMENTS π
gnutls_x509_name_constraints_t ncβ the name constraints that got extracted already. this is the receipts pile, the thing we're checking against.gnutls_x509_subject_alt_name_t typeβ the type of the constraint you wanna check (it's of typegnutls_x509_subject_alt_name_t, so, exactly what it says on the tin β¨).gnutls_x509_crt_t certβ the certificate being checked. the poor little guy getting the vibe check.
π¦ DESCRIPTION π¦
so this function checks the names in the certificate you handed it against the constraints sitting in nc, and it does that using the RFC5280 rules β no made-up rules, no vibes-based rules, just RFC5280, bestie. and it's thorough: it will traverse all of the certificate's names and all its alternative names. every single one. no skimming π
β οΈ currently this function is limited to DNS names and emails (of typeGNUTLS_SAN_DNSNAMEandGNUTLS_SAN_RFC822NAME). so like, it's giving main character energy in those two lanes specifically, and only those two. don't come for it about other SAN types, she's not built for that yet π
β RETURNS β
- zero if the provided name is not acceptable π
- non-zero otherwise β meaning yes, acceptable, slay β
π SINCE π
3.3.0 β she's been around, she's an icon, we stan a legacy baddie π
π REPORTING BUGS π
found something cursed? don't suffer in silence, tell the devs:
- Report bugs to
<bugs@gnutls.org>. π¬ - Home page:
https://www.gnutls.orgβ go touch grass there, it's nice
π 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. (yes that means you can share it, go off, just keep the notice, okay? π«Ά)
π§ 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/
like, the whole manual manual. the big one. go read it, it's right there π
that's a wrap, babe π this page came from gnutls 3.8.13 β mwah, go forth and constrain those names responsibly β¨π
π¦ 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