gnutls_x509_ex...ame_constraints(3)
β¨ gnutls_x509_ext_import_name_constraints β¨
okay bestie, gather round π«Ά this one lives in the gnutls manual, and the page title is lowkey truncated to gnutls_x509_ex...ame_constraints(3) because apparently even manpages have a character limit. we move. π
πΈ NAME πΈ
gnutls_x509_ext_import_name_constraints β an API function, and yes it's a whole mouthful, iykyk π
π SYNOPSIS π
#include <gnutls/x509-ext.h>
int gnutls_x509_ext_import_name_constraints(const gnutls_datum_t * ext,
gnutls_x509_name_constraints_t nc, unsigned int flags);
π ARGUMENTS π
const gnutls_datum_t * extβ a DER encoded extension, fr fr that's the raw material you're feeding in πgnutls_x509_name_constraints_t ncβ The nameconstraints. the main character of this whole operation πunsigned int flagsβ either zero, orGNUTLS_NAME_CONSTRAINTS_FLAG_APPEND. that's the whole menu, no secret options β¨
π¦ DESCRIPTION π¦
so this function will return an intermediate type containing the name constraints of the provided NameConstraints extension. that's the vibe. π
you then pair it up with gnutls_x509_name_constraints_check() to verify whether a server's name is in accordance with the constraints. duo. iconic. no cap. π₯
when the flags is set to GNUTLS_NAME_CONSTRAINTS_FLAG_APPEND, then if the nc type is empty, this function will behave identically as if the flag was not set. literally identical, zero difference, periodt.
otherwise, if there are elements in the nc structure, then the constraints will be merged with the existing constraints following RFC5280 p6.1.4 β and bestie, the merge rules are: excluded constraints will be appended, permitted will be intersected. that's the whole tea π΅
β οΈ note that nc must be initialized prior to calling this function. not optional. not a suggestion. initialize her first or it's giving chaos π
β RETURNS β
- on success,
GNUTLS_E_SUCCESS(0) is returned π GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLEif the extension is not present π- otherwise a negative error value π
π SINCE π
3.3.0 β she's been around a minute, an elder stateswoman honestly π
π REPORTING BUGS π
found a bug? report it, bestie, they wanna know π«Ά
- Report bugs to <bugs@gnutls.org>.
- Home page: https://www.gnutls.org
π 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 page, bestie π this little gem shipped as part of gnutls 3.8.13 β go forth, import those name constraints, and slay β¨π
π¦ 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