GNUTLS_X509_NAME_CONSTRAINTS_ADD_PERMITTED(3)

πŸ’– gnutls_x509_name_constraints_add_permitted πŸ’–

okay bestie, sit down, hydrate, because we're doing a gnutls manpage and this one is literally about telling a certificate "hey, these names are ALLOWED, periodt." it lives in the gnutls manual (section 3, the library-functions girlies), so come get your knowledge πŸŽ€


✨ NAME ✨

gnutls_x509_name_constraints_add_permitted β€” an API function, aka the glow-up that adds a permitted name constraint to your list πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int
gnutls_x509_name_constraints_add_permitted(gnutls_x509_name_constraints_t
nc, gnutls_x509_subject_alt_name_t type, const gnutls_datum_t * name);

she returns an int, she takes three args, she's lowkey iconic πŸ¦‹


πŸŽ€ ARGUMENTS πŸŽ€

  • gnutls_x509_name_constraints_t nc β€” the nameconstraints. yes that's the whole description bestie, she's the thing you're adding to 🫢
  • gnutls_x509_subject_alt_name_t type β€” the type of the constraints. the vibe check of what kind of name we're permitting 🌈
  • const gnutls_datum_t * name β€” the data of the constraints. the actual bytes, the moment, the content πŸ’–

πŸ’… DESCRIPTION πŸ’…

so what does she do. this function will add a name constraint to the list of permitted constraints. not the forbidden ones, the permitted ones. there's a difference and we respect it ✨

the constraints type can be any of the following types, no exceptions, she's picky in a cute way:

  • GNUTLS_SAN_DNSNAME
  • GNUTLS_SAN_RFC822NAME
  • GNUTLS_SAN_DN
  • GNUTLS_SAN_URI
  • GNUTLS_SAN_IPADDRESS

and for the latter one β€” that's GNUTLS_SAN_IPADDRESS, keep up β€” an IP address in network byte order is expected, followed by its network mask. that's the assignment. network byte order. mask after. don't play with me πŸ™ˆ


⭐ RETURNS ⭐

on success, GNUTLS_E_SUCCESS (0) is returned. otherwise you get a negative error value, and that's your sign to go read the error and heal 😭


πŸ¦‹ SINCE πŸ¦‹

3.3.0 β€” she's been here, she's vintage, she's a classic πŸ’œ


πŸ“ REPORTING BUGS πŸ“

found a bug? report bugs to <bugs@gnutls.org>. home page: https://www.gnutls.org 🫢

no cap, if something's broken just tell them, they want to know

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. like, legally, you're free to share, just keep the receipts πŸ’–


🌈 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/

that's the mothership, go there for the whole lore πŸ“š


and that's the page bestie, you ate πŸ’… this was gnutls version 3.8.13, signing off with love and zero negative error values πŸŒΈπŸ’–βœ¨

πŸ“¦ where this page comes from