gnutls_x509_ext_export_policies(3)
β¨ gnutls_x509_ext_export_policies β¨
okay bestie, gather round π this one lives in the gnutls manual (section 3, the library-functions girlies), and it's genuinely such a useful little function. no cap.
πΈ NAME πΈ
gnutls_x509_ext_export_policies β it's an API function, and it's here to turn your policies into certificate policy extension bytes π
π¦ SYNOPSIS π¦
#include <gnutls/x509-ext.h>
int gnutls_x509_ext_export_policies(gnutls_x509_policies_t policies,
gnutls_datum_t * ext);
π ARGUMENTS π
gnutls_x509_policies_t policiesβ a pointer to an initialized policies. like, it has to be initialized, okay? don't come at it with a random uninitialized struct, that's not the vibe πgnutls_datum_t * extβ this is where the DER-encoded extension data lands. and listen β you MUST free it usinggnutls_free(). do not forget. forgetting is giving memory leak energy and we do not stan π
π DESCRIPTION π
so what does this actually do? it takes the policies you handed it and converts them into a certificate policy DER-encoded extension, specifically the OID 2.5.29.32. iconic extension, no notes β¨
and the ext data? that gets allocated using gnutls_malloc(). so yeah, that's why you free it with gnutls_free() β matching allocator, matching freer, that's the rule π«Ά
π RETURNS π
on success you get GNUTLS_E_SUCCESS (which is 0) back. slay π anything else means a negative error value, so likeβ¦ check it. fr fr.
β SINCE β
3.3.0 β she's been around a while, a true veteran π
π 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 π§
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, that's the whole thing, and yes, it's very generous of 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/
and that's the whole page, bestie π this was gnutls version 3.8.13 talking, dropping the gnutls_x509_ext_export_policies(3) knowledge straight into your group chat. go export those policies and free that ext, mwah πβ¨
π¦ where this page comes from
- alpine 3.22: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.23: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- alpine 3.24: gnutls-doc 3.8.13-r0 Β· LGPL-2.1-or-later
- arch rolling: gnutls 3.8.13-3 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 43: gnutls-devel 3.8.13-1.fc43 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- fedora 44: gnutls-devel 3.8.13-1.fc44 Β· GPL-3.0-or-later AND LGPL-2.1-or-later
- ubuntu stonking: gnutls-doc 3.8.13-1ubuntu1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms