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 a gnutls_x509_crq_t type. 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 be NULL, no pressure. the value is 1 if the certificate CA flag is set, and 0 otherwise πŸ’–
  • int * pathlen β€” pointer to an output integer showing the path length (also may be NULL). non-negative error codes mean there's a present pathLenConstraint field and the actual value is right there. -1 means 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 basicConstraints extension, GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE will 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 Β© 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