gnutls_x509_cr...key_purpose_oid(3)
π gnutls_x509_cr...key_purpose_oid(3) π
okay bestie, sit down, hydrate, because we're talking about gnutls_x509_crt_set_key_purpose_oid β part of the gnutls manual, and honestly? she's a baddie. this is the one that tells a certificate what it's allowed to be used for. main character energy for your X.509 certs, fr fr. π
β¨ NAME β¨
gnutls_x509_crt_set_key_purpose_oid β it's an API function, periodt. π
πΈ SYNOPSIS πΈ
#include <gnutls/x509.h>
int gnutls_x509_crt_set_key_purpose_oid(gnutls_x509_crt_t cert, const
void * oid, unsigned int critical);
like, look at her. three args, one return, no drama. π¦
π«Ά ARGUMENTS π«Ά
gnutls_x509_crt_t certβ bestie this is your certificate, and it's gotta be of typegnutls_x509_crt_t. no substitutions, no knockoffs, the real thing only. πconst void * oidβ a pointer to a null terminated string that holds the OID. yes, null terminated, she needs her little\0at the end or she's lost. πunsigned int criticalβ this is the vibe check on your extension: are we marking it critical or not? that's literally it, that's the whole question. β
π₯ DESCRIPTION π₯
okay so here's the tea: this function sets the key purpose OIDs of the Certificate. the way that they live inside the Extended Key Usage extension (2.5.29.37) β iconic behavior, no cap. and if you want human readable names instead of raw OID strings? go look at the GNUTLS_KP_* definitions. iykyk. π
and listen β subsequent calls to this function will append OIDs to the OID list. so it's not a "replace everything" situation, it's a "yes and" situation. every call stacks another one on. so don't call it twice thinking you're overwriting, because you are absolutely not. π
π RETURNS π
on success you get GNUTLS_E_SUCCESS (0) and honestly? we love a zero. otherwise you get a negative error code, which is giving "something went wrong, go read the error". π
π REPORTING BUGS π
found a bug? don't suffer in silence, bestie. report it to <bugs@gnutls.org> β they want to hear from you fr fr. π«Ά
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. so like, go forth and share, 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/
and that's the whole page, bestie!! β¨ this one's from gnutls 3.8.13 (source/version, as promised) β go set some key purpose OIDs and slay responsibly. mwah. ππ
π¦ 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