gnutls_x509_cr...sic_constraints(3)
π gnutls_x509_crq_get_basic_constraints π
okay bestie, so this one lives in the gnutls manual, and it's literally the glow-up you need when you're staring at a certificate request going "are you a CA or not, queen?" π
β¨ NAME β¨
gnutls_x509_crq_get_basic_constraints β an API function, and yes she's the main character π
πΈ SYNOPSIS πΈ
#include <gnutls/x509.h>
int gnutls_x509_crq_get_basic_constraints(gnutls_x509_crq_t crq,
unsigned int * critical, unsigned int * ca, int * pathlen);
no cap, that's the whole vibe right there π¦
π«Ά ARGUMENTS π«Ά
gnutls_x509_crq_t crqβ this is the one that should contain agnutls_x509_crq_ttype. she's the star of the show β¨unsigned int * criticalβ this lil pointer will be non-zero if the extension is marked as critical. like, it's giving "pay attention to me" energy π₯unsigned int * caβ pointer to an output integer that tells you the CA status. it may beNULL, no pressure. the value is1if the certificate CA flag is set, and0otherwise πint * pathlenβ pointer to an output integer showing the path length (also may beNULL). non-negative error codes mean there's a presentpathLenConstraintfield and the actual value is right there.-1means the field is absent. so basically:-1= ghosted you π»
π DESCRIPTION π
This function will read the certificate's basic constraints, and return the certificate's CA status. She reads the basicConstraints X.509 extension β you know the one, 2.5.29.19 π
β RETURNS β
- If the certificate is a CA, a positive value will be returned π
- Or
(0)if the certificate does not have the CA flag set. not everyone can be a CA, and that's okay π₯Ί - A negative error code may be returned in case of errors π
- If the certificate does not contain the
basicConstraintsextension,GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLEwill be returned. literally the "she's not here" of error codes π
π SINCE π
2.8.0 β an icon since day one, fr fr π
π REPORTING BUGS π
Found a bug? Don't be shy, 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. so like, keep the receipts and you're good, 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, visit
https://www.gnutls.org/manual/
iykyk πβ¨
mwah π that was gnutls version 3.8.13, page gnutls_x509_cr...sic_constraints(3). go read your certs, bestie, you got this π«Ά
π¦ 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