gnutls_x509_ext_import_policies(3)
β¨ gnutls_x509_ext_import_policies β¨
okay bestie, welcome to the gnutls manual, this page is all about gnutls_x509_ext_import_policies(3) and honestly? she's a little baddie. let's get into it π
πΈ NAME πΈ
gnutls_x509_ext_import_policies β it's an API function, no cap.
π SYNOPSIS π
#include <gnutls/x509-ext.h>
int gnutls_x509_ext_import_policies(const gnutls_datum_t * ext,
gnutls_x509_policies_t policies, unsigned int flags);
like, that's the whole vibe right there. copy it exactly, don't freestyle it π
π¦ ARGUMENTS π¦
const gnutls_datum_t * extβ this is the DER encoded extension data, so it's giving raw bytes and you gotta respect her for that πgnutls_x509_policies_t policiesβ a pointer to an initializedpolicies. key word: initialized. she needs to be ready before you show up.unsigned int flagsβ should be zero. that's it. that's the whole thing. zero. periodt.
π DESCRIPTION π
so what does this function actually do? bestie, it will extract the certificate policy extension, and that extension's OID is 2.5.29.32 (iykyk), and then it stores it in the policies you handed it. that's the mission. that's the main character moment. π«Ά
β RETURNS β
when everything slays, you get GNUTLS_E_SUCCESS which is literally 0 π otherwise you get a negative error value, which is the universe telling you something went wrong π
π SINCE π
3.3.0 β she's been around, she's an icon, she's a legend, and she is the moment π
π REPORTING BUGS π
found a bug? not me being dramatic but please tell the devs fr fr:
- 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. so like, go off, share the love, 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/
lowkey important:flagsshould be zero, andpoliciesneeds to be initialized first. don't skip the setup, bestie, that's how you end up with a negative return value and a bad vibe check π
and that's the page!! this was gnutls version 3.8.13, and yeah, the whole thing is from the gnutls manual β tysm for reading, 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