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 initialized policies. 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:


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: flags should be zero, and policies needs 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