GNUTLS_X509_NAME_CONSTRAINTS_GET_PERMITTED(3)

πŸ’– gnutls_x509_name_constraints_get_permitted(3) πŸ’–

okay bestie, so this one lives in the gnutls manual (section 3, the library functions girlies ✨), and it's literally the function that hands you one single name constraint at a time. no cap.


✨ NAME ✨

gnutls_x509_name_constraints_get_permitted β€” the API function that fishes a permitted name constraint out of the pile πŸŽ€


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int
gnutls_x509_name_constraints_get_permitted(gnutls_x509_name_constraints_t
nc, unsigned idx, unsigned * type, gnutls_datum_t * name);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_name_constraints_t nc β€” the extracted name constraints, aka the whole vibe you pulled out earlier πŸ’…
  • unsigned idx β€” the index of the constraint. like, which one are we looking at bestie, they're numbered πŸ”’
  • unsigned * type β€” the type of the constraint (and it's of type gnutls_x509_subject_alt_name_t, okurrr) 🏷️
  • gnutls_datum_t * name β€” the name in the constraint (of the specific type, so it matches whatever type said) πŸ“›

πŸ‘‘ DESCRIPTION πŸ‘‘

This function will return an intermediate type containing the name constraints of the provided CA certificate. That structure can be used in combination with gnutls_x509_name_constraints_check() to verify whether a server's name is in accordance with the constraints.

the way that this is a two-step situation β€” you get the constraints here, then you go check them against a server name with gnutls_x509_name_constraints_check(). iconic combo, fr fr 🀝

The name should be treated as constant and valid for the lifetime of nc.

no touching, no editing, no keeping it after nc dips πŸ‘‹ β€” it's borrowed, not yours.

⭐ RETURNS ⭐

On success, GNUTLS_E_SUCCESS (0) is returned, GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE if the extension is not present, otherwise a negative error value.

so basically: 0 = slay πŸ’–, that one specific code = the extension literally isn't there πŸ™ˆ, and anything negative = it went wrong, read the error girlie πŸ’€


🌈 SINCE 🌈

3.3.0 β€” old money, been here since forever ✨


🫢 REPORTING BUGS 🫢

Report bugs to <bugs@gnutls.org>. Home page: https://www.gnutls.org

found something cursed? tell the gnutls girlies, they wanna 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.


🧚 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 bestie, go forth and constrain those names πŸ’…

✨ this cutie was brought to you by gnutls 3.8.13 β€” mwah, bye πŸŽ€πŸ’–

πŸ“¦ where this page comes from