GNUTLS_X509_EXT_IMPORT_BASIC_CONSTRAINTS(3)

πŸ’– gnutls_x509_ext_import_basic_constraints πŸ’–

okay bestie, so this one lives in the gnutls manual (you know, the whole TLS library situation) and it's version 3.8.13. It's an API function, and it's lowkey one of the cutest little X.509 helpers you'll ever meet. Let's get into it πŸŽ€


✨ NAME ✨

gnutls_x509_ext_import_basic_constraints β€” it's an API function, and it does exactly one thing: pulls the basic constraints info out of a DER-encoded extension. slay πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/x509-ext.h>

int gnutls_x509_ext_import_basic_constraints(const gnutls_datum_t * ext,
       unsigned int * ca, int * pathlen);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • const gnutls_datum_t * ext β€” this is the DER encoded extension data, like the raw bytes, the whole vibe, unprocessed. it's giving "here's the blob, you deal with it" πŸ’€
  • unsigned int * ca β€” when this comes back it'll be non zero if the CA status is true. so like, zero = not a CA, nonzero = yes queen she's a CA πŸ‘‘
  • int * pathlen β€” the path length constraint, and listen: it gets set to -1 for no limit. so -1 is the "no cap, go wild" value fr fr πŸ™ˆ

πŸ’œ DESCRIPTION πŸ’œ

So this function will return the CA status and the path length constraint exactly as they're written in the PKIX extension 2.5.29.19. That's it. That's the whole function. She's simple, she's effective, she ate ✨


🌈 RETURNS 🌈

On success, GNUTLS_E_SUCCESS (0) is returned. Otherwise you get a negative error value, which is never the vibe but at least it's honest about it 😭


⭐ SINCE ⭐

3.3.0 β€” so she's been around a minute, a real veteran, main character since day one 🫢


πŸ’€ REPORTING BUGS πŸ’€

Found a bug? Not the cute kind? Report it 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. (yes bestie, that means you can share it, just keep the receipts πŸ’–)


🌸 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, no notes πŸ’… ok bye bestie, go read those certs, mwah πŸ§šπŸ’–

gnutls β€” version 3.8.13 β€” signing off ✨

πŸ“¦ where this page comes from