GNUTLS_X509_EXT_EXPORT_BASIC_CONSTRAINTS(3)

πŸ’… NAME πŸ’…

gnutls_x509_ext_export_basic_constraints β€” bestie, this is the API function that packs up basic constraints into a DER extension ✨


🌸 SYNOPSIS 🌸

#include <gnutls/x509-ext.h>

int gnutls_x509_ext_export_basic_constraints(unsigned int ca, int
pathlen, gnutls_datum_t * ext);

πŸŽ€ ARGUMENTS πŸŽ€

  • unsigned int ca β€” okay so if this is non-zero, congrats, you're saying it's a CA πŸ‘‘
  • int pathlen β€” the path length constraint. Set it to -1 if you literally want no constraint at all, no cap πŸ™…β€β™€οΈ
  • gnutls_datum_t * ext β€” the DER-encoded extension data that comes out of this. Heads up bestie: it must be freed using gnutls_free(). Don't ghost it, free it πŸ’€

πŸ¦‹ DESCRIPTION πŸ¦‹

This function will convert the parameters provided to a basic constraints DER encoded extension (2.5.29.19). The ext data will be allocated using gnutls_malloc(). So like, it's giving "here's your extension, made fresh, you own it now" ✨


⭐ RETURNS ⭐

On success, GNUTLS_E_SUCCESS (0) is returned β€” slay πŸŽ‰ Otherwise you get a negative error value, which is the universe's way of saying not today 😭


🌈 SINCE 🌈

3.3.0 β€” she's been iconic since day one, iykyk πŸ’œ


πŸ™ˆ REPORTING BUGS πŸ™ˆ

Found a bug? Don't suffer in silence, tell the devs 🫢 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. Basically: go off, 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, bestie πŸ’… this was gnutls 3.8.13, page gnutls_x509_ext...sic_constraints(3), and yes the title got cute-snipped but you knew that already ✨ stay allocated, stay free'd, mwah πŸŽ€

πŸ“¦ where this page comes from