gnutls_x509_cr...sic_constraints(3)

πŸ’– gnutls_x509_crq_set_basic_constraints β€” the glow-up your cert request needed ✨

okay bestie, so this one lives in the gnutls manual, section 3, and it's literally the function that stamps the basicConstraints extension onto a certificate request. it's giving "yes i am allowed to sign other certs, and here's how deep this chain can go" πŸ‘‘


🌸 NAME 🌸

gnutls_x509_crq_set_basic_constraints β€” API function. that's the whole name, no notes, iconic behavior honestly.


πŸŽ€ SYNOPSIS πŸŽ€

#include <gnutls/x509.h>

int gnutls_x509_crq_set_basic_constraints(gnutls_x509_crq_t crq,
unsigned int ca, int pathLenConstraint);

πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_crq_t crq β€” a certificate request of type gnutls_x509_crq_t. this is your little baby CRQ, the one you're about to decorate πŸ’…
  • unsigned int ca β€” true(1) or false(0), depending on the Certificate authority status. so like, is this thing allowed to be a CA or not. binary queen. no in-between.
  • int pathLenConstraint β€” non-negative error codes indicate maximum length of path, and negative error codes indicate that the pathLenConstraints field should not be present. so: give it a real number and you're capping the chain depth; give it something negative and the field just... doesn't show up. ghosted fr. πŸ™ˆ

✨ DESCRIPTION ✨

This function will set the basicConstraints certificate extension.

that's it. that's the whole job. it reaches in, it sets the extension, it slays. no cap.


πŸ”₯ RETURNS πŸ”₯

On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. so 0 = we ate πŸ’…, anything negative = something went sideways, go read the error, bestie.


⭐ SINCE ⭐

2.8.0 β€” old money. been holding it down since way back.


πŸ› REPORTING BUGS πŸ›

Report bugs to <bugs@gnutls.org>.

Home page: https://www.gnutls.org

not me telling you to actually email the bugs in, but like, if you found one, do it 🫢 they wanna know.

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. periodt. that's the license, and it's generous, we love that for them.


🌈 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/

like, if the local docs aren't there, the website has you covered, iykyk πŸ’œ


and that's the whole page, bestie πŸ’– this is from gnutls version 3.8.13 β€” go set those basic constraints, you main character πŸ§šβ€β™€οΈβœ¨

πŸ“¦ where this page comes from