gnutls_x509_cr...hibit_anypolicy(3)

πŸ’– gnutls_x509_cr...hibit_anypolicy β€” bestie edition πŸ’–

okay so this is one of the gnutls manual pages (section 3, library calls, iykyk) and we're talking about gnutls_x509_crt_get_inhibit_anypolicy, which is, and I cannot stress this enough, an API function. πŸŽ€


✨ NAME ✨

gnutls_x509_crt_get_inhibit_anypolicy β€” it's an API function, bestie. that's the whole name. short, sweet, does exactly one thing. πŸ’…


🌸 SYNOPSIS 🌸

first you gotta bring it into the group chat:

#include <gnutls/x509.h>

and here's the whole vibe, character for character:

int gnutls_x509_crt_get_inhibit_anypolicy(gnutls_x509_crt_t cert,
unsigned int * skipcerts, unsigned int * critical);

like. she takes three things and gives you back an int. slay. ✨


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_crt_t cert β€” should contain a gnutls_x509_crt_t type. yes girl, that's the cert you're snooping on, she's the main character here. πŸ‘‘
  • unsigned int * skipcerts β€” this pointer is gonna get filled with the number of certificates after which anypolicy is no longer acceptable. it's an out-param, so she's writing into your variable, not reading from it. 🫢
  • unsigned int * critical β€” this one will be non-zero if the extension is marked as critical. zero means "not critical", anything else means "she's critical, pay attention". ⭐

πŸ’œ DESCRIPTION πŸ’œ

so what does this function actually do. she returns the certificate's value of the SkipCerts, which is to say, the Inhibit anyPolicy X.509 extension β€” and that extension's OID is 2.5.29.54. write that down. πŸ’–

and the value you get back is literally the number of additional certificates that may appear in the path before the anyPolicy is no longer acceptable. like, "you've got this many more steps before anyPolicy stops being invited to the party". no cap. πŸŽ€


🌈 RETURNS 🌈

  • returns zero on success πŸŽ‰
  • returns a negative error code if there's a parsing error 😭
  • and if the certificate simply doesn't contain the Inhibit anyPolicy extension, you get GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE β€” which is basically the library saying "bestie, there's nothing here to look at". πŸ™ˆ

⭐ SINCE ⭐

3.6.0 β€” she's been around since 3.6.0, an icon, an era. πŸ’…


πŸ“ REPORTING BUGS πŸ“

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

they want to hear from you 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. you can share her, just keep the receipts attached. periodt. πŸ’–


🧚 SEE ALSO 🧚

the full documentation for gnutls is maintained as a Texinfo manual. and if the /usr/share/doc/gnutls/ directory does not contain the HTML form, go visit:

https://www.gnutls.org/manual/

ngl the "see also" here is doing a lot of heavy lifting β€” check the directory first, and if the HTML isn't there, the website's got you. πŸ’œ

that's the whole page, bestie. every flag, every pointer, every OID, every copyright line β€” all present and accounted for, just with way more sparkle. πŸ’–βœ¨

this was page gnutls_x509_cr...hibit_anypolicy(3) from gnutls version 3.8.13, and yes the version and date live down here at the bottom where the footer usually is, so consider this your cute little sign-off. bye bestie, go parse some certificates responsibly. πŸŽ€πŸ’…πŸŒˆ

πŸ“¦ where this page comes from