GNUTLS_X509_EXT_IMPORT_INHIBIT_ANYPOLICY(3)

πŸ’– gnutls_x509_ext_import_inhibit_anypolicy β€” bestie edition πŸ’–

okay so we're in the gnutls manual, section 3, and today's main character is gnutls_x509_ext_import_inhibit_anypolicy. it's an API function. yes queen, we're reading X.509 extension guts together, grab a boba πŸ§‹


✨ NAME ✨

gnutls_x509_ext_import_inhibit_anypolicy β€” API function πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <gnutls/x509-ext.h>

int gnutls_x509_ext_import_inhibit_anypolicy(const gnutls_datum_t * ext,
       unsigned int * skipcerts);

🌸 ARGUMENTS 🌸

  • const gnutls_datum_t * ext β€” the DER encoded extension data, aka the raw lil blob we're about to read πŸ“¦
  • unsigned int * skipcerts β€” this pointer is gonna get filled in with the number of certificates after which anypolicy is no longer acceptable. she's an output, bestie, she holds the answer πŸ’…

πŸ‘‘ DESCRIPTION πŸ‘‘

so this function returns the certificate's value of SkipCerts, and it does that by reading the DER data of the Inhibit anyPolicy X.509 extension, OID 2.5.29.54. yes, the whole 2.5.29.54, no cap πŸ”₯

and what even is skipcerts? it's the number of additional certificates that may appear in the path before the anyPolicy (GNUTLS_X509_OID_POLICY_ANY) is no longer acceptable. so it's like… how much longer the vibe stays acceptable before policy says "nope, we're done here" βœ‹βœ¨


🌈 RETURNS 🌈

zero on success, or a negative error code in case of parsing error 😭

and listen β€” if the certificate does not contain the Inhibit anyPolicy extension, you're getting GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE back. that's not a crash, that's just her telling you the thing isn't there πŸ™ˆ


⭐ SINCE ⭐

3.6.0 β€” she's been iconic since 3.6.0, periodt πŸ’œ


🫢 REPORTING BUGS 🫢

found a bug? don't be shy, tell the devs:


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.


πŸ’€ 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 3.8.13 of gnutls_x509_ext...hibit_anypolicy(3) β€” go forth and parse your extensions responsibly, mwah πŸ’‹πŸŒΈ

πŸ“¦ where this page comes from