GNUTLS_X509_NAME_CONSTRAINTS_CHECK(3)

πŸ’– gnutls_x509_name_constraints_check πŸ’–

okay bestie, this one's from the gnutls manual, section 3 (library calls, iykyk). it's giving "certificate validation but make it cute" ✨


πŸŽ€ NAME πŸŽ€

gnutls_x509_name_constraints_check β€” the API function that vibe-checks a name against your constraints. no cap.


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

unsigned
gnutls_x509_name_constraints_check(gnutls_x509_name_constraints_t nc,
gnutls_x509_subject_alt_name_t type, const gnutls_datum_t * name);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_name_constraints_t nc β€” the name constraints you already extracted, bestie. the receipts, if you will.
  • gnutls_x509_subject_alt_name_t type β€” the type of the constraint you're checking (and yes, it's of type gnutls_x509_subject_alt_name_t, so iconic of it).
  • const gnutls_datum_t * name β€” the actual name that's about to get checked. main character energy fr.

✨ DESCRIPTION ✨

so basically, this function checks the name you handed it against the constraints sitting inside nc, and it does that using the RFC5280 rules πŸ’…. the rules are the rules, periodt.

lowkey important: right now this function is limited to DNS names, emails, and IP addresses β€” aka the types GNUTLS_SAN_DNSNAME, GNUTLS_SAN_RFC822NAME, and GNUTLS_SAN_IPADDRESS. anything else? not today, babe. 🫢

πŸ‘‘ RETURNS πŸ‘‘

  • zero if the name you provided is not acceptable 😭
  • non-zero otherwise 🌈

yes, the logic is a little reversed from what your brain wants, but that's the assignment and we're slaying it.


⭐ SINCE ⭐

3.3.0 β€” an elder. a legend. a classic.


πŸ’€ REPORTING BUGS πŸ’€

found a bug? not you being the bug reporter, we love that for you πŸ’– report it to:


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. (free as in freedom, bestie πŸ•ŠοΈ)


🧚 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, go visit:


and that's the whole page, no skips, no missing bits, we ate πŸ“

later bestie β€” this was page gnutls_x509_nam...nstraints_check(3) from gnutls 3.8.13. mwah πŸ’…πŸŒΈ

πŸ“¦ where this page comes from