gnutls_x509_crt_set_policy(3)
π gnutls_x509_crt_set_policy(3) β the gnutls manual, but make it make sense
okay bestie, sit down, hydrate, because we're about to give your certificate a whole β¨personalityβ¨ (it's a policy, it's literally its vibe statement). This one lives in the gnutls manual, section 3, and it's an API function. Let's get into it π«Ά
β¨ NAME β¨
gnutls_x509_crt_set_policy β API function
π SYNOPSIS π
#include <gnutls/x509.h>
int gnutls_x509_crt_set_policy(gnutls_x509_crt_t crt, const struct
gnutls_x509_policy_st * policy, unsigned int critical);
π ARGUMENTS π
gnutls_x509_crt_t crtβ bestie this one "should contain agnutls_x509_crt_ttype". that's it, that's the requirement. it's the cert we're decorating πconst struct gnutls_x509_policy_st * policyβ a pointer to a policy. the actual vibe content. πunsigned int criticalβ pass something non-zero if you want this extension marked as critical. like, loudly critical. π¨
π DESCRIPTION π
So what this function does is it sets the certificate policy extension β that's 2.5.29.32 for the OID girlies β onto your cert. β¨
And here's the fun part: it appends. Call it multiple times and you just keep stacking new policies. multiple calls = multiple policies. it's giving collect-them-all. πΈ
β οΈ Now the important bit, no cap: the max text size for the qualifierGNUTLS_X509_QUALIFIER_NOTICEis 200 characters. Go over that and this function will fail withGNUTLS_E_INVALID_REQUEST. so watch your character count, bestie, this is not the place for an essay π
β RETURNS β
On success you get GNUTLS_E_SUCCESS β which is 0, slay. π
Otherwise you get a negative error value. so if the number's negative, something's off, and you should go read it. periodt.
π¦ SINCE π¦
3.1.5 β it's been around a while, it's iconic, it's established. π
π REPORTING BUGS π
Found something cursed? 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. (yes queen, redistribute it, 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/
k bye that's the whole page, mwah π
this has been gnutls_x509_crt_set_policy(3) from gnutls 3.8.13 β the gnutls manual, version 3.8.13, same page name in the footer, go set some policies and stay hydrated π«Άβ¨π
π¦ 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