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 typegnutls_x509_subject_alt_name_t, okurrr) π·οΈgnutls_datum_t * nameβ the name in the constraint (of the specific type, so it matches whatevertypesaid) π
π 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 π
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
- 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