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 type gnutls_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 type GNUTLS_SAN_DNSNAME and GNUTLS_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 Β© 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