gnutls_x509_ex...ame_constraints(3)

πŸ’– gnutls_x509_ext_export_name_constraints β€” bestie's guide to yeeting name constraints into DER ✨

okay so this page lives in the gnutls manual, and it's all about gnutls_x509_ext_export_name_constraints β€” the lil glow-up function that takes your name constraints and turns them into actual DER-encoded extension bytes. it's giving "craft supplies but make it PKIX". πŸŽ€


✨ NAME ✨

gnutls_x509_ext_export_name_constraints β€” it's an API function, no cap πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/x509-ext.h>

int
gnutls_x509_ext_export_name_constraints(gnutls_x509_name_constraints_t
nc, gnutls_datum_t * ext);

like yes, the return type is int, and yes, the function signature wraps across lines in the synopsis, that's just how she is 🫢


🌸 ARGUMENTS 🌸

  • gnutls_x509_name_constraints_t nc β€” the nameconstraints themselves, your main character input πŸ‘‘
  • gnutls_datum_t * ext β€” the DER-encoded extension data that comes out of this. ⚠️ bestie listen: this must be freed using gnutls_free(). don't just leave it out there vibing, that's a leak 😭

πŸ’œ DESCRIPTION πŸ’œ

so what does she actually do? this function will convert the provided name constraints type to a DER-encoded PKIX NameConstraints extension β€” and the OID for that is (2.5.29.30), iconic ⭐

the output data in ext will be allocated using gnutls_malloc(). so it's gnutls's memory, which means it's gnutls's free function (gnutls_free()) that has to clean it up. they're a matched set, don't split them up πŸ’”


πŸ”₯ RETURNS πŸ”₯

on success, GNUTLS_E_SUCCESS (0) is returned β€” slay ✨ otherwise you get a negative error value, which is the universe telling you something went sideways πŸ™ˆ


πŸŽ€ SINCE πŸŽ€

3.3.0 β€” she's been here a while, a true veteran πŸ’–


😀 REPORTING BUGS 😀

found a bug? don't suffer in silence, tell the people:

fr fr, emailing bugs is self-care. do it. 🫢

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.

(translation: copy it, share it, remix 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/

that's the whole lore, go read it, iykyk πŸ“šβœ¨


and that's the page!! πŸ’– this one came from the gnutls manual, version 3.8.13 β€” mwah, go free your datums bestie πŸ’…βœ¨

πŸ“¦ where this page comes from