gnutls_x509_crt_get_policy(3)
β¨ gnutls_x509_crt_get_policy(3) β¨
okay bestie, so this is a page from the gnutls manual β like, the official docs for the gnutls library β and it's all about pulling a certificate policy out of an X.509 cert. it's giving very "let me peek inside this certificate real quick" energy π
πΈ NAME πΈ
gnutls_x509_crt_get_policy β API function
π SYNOPSIS π
#include <gnutls/x509.h>
int gnutls_x509_crt_get_policy(gnutls_x509_crt_t crt, unsigned indx,
struct gnutls_x509_policy_st * policy, unsigned int * critical);
π ARGUMENTS π
gnutls_x509_crt_t crtβ should contain agnutls_x509_crt_ttype. yes literally, that's the vibe, it's the certificate you're interrogating π΅οΈβοΈunsigned indxβ this specifies which policy to return. use(0)to get the first one. so like, index 0 is your main character, and everything after is the supporting cast β¨struct gnutls_x509_policy_st * policyβ a pointer to a policy structure. this is where the tea gets poured βunsigned int * criticalβ will be non-zero if the extension is marked as critical. so if this comes back non-zero, bestie, the cert is being serious about it π¨
π¦ DESCRIPTION π¦
this function will extract the certificate policy (extension 2.5.29.32) specified by the given index. slay, we love a targeted extraction π
the policy returned by this function must be deinitialized by using gnutls_x509_policy_release(). not me stressing this β it's literally in the docs. clean up after yourself, periodt π§Ή
π RETURNS π
- on success,
GNUTLS_E_SUCCESS(0) is returned π GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLEif the extension is not present (so like, the policy said "i'm not coming to the function today" π)- otherwise a negative error value π
β SINCE β
3.1.5 β old money, iconic, been here since forever π
π«Ά REPORTING BUGS π«Ά
found a bug? tell the gnutls girlies:
- 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. no cap, you can share this fr fr π
π§ 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 came straight out of the gnutls manual, version 3.8.13, for gnutls_x509_crt_get_policy(3) β go forth and extract those policies, you've got this π¦β¨π
π¦ 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