gnutls_x509_ex...rt_key_purposes(3)
π gnutls_x509_ext_import_key_purposes β the manual, but make it cute π
okay bestie, so this is a page from the gnutls manual, and it's all about one lil function that does one lil job. let's get into it β¨
π NAME π
gnutls_x509_ext_import_key_purposes β it's an API function, that's the whole name, no notes π
πΈ SYNOPSIS πΈ
#include <gnutls/x509-ext.h>
int gnutls_x509_ext_import_key_purposes(const gnutls_datum_t * ext,
gnutls_x509_key_purposes_t p, unsigned int flags);
there she is. that's the whole signature, don't touch it π«Ά
π¦ ARGUMENTS π¦
const gnutls_datum_t * extβ the DER-encoded extension data. that's the raw bytes you're handing over, bestie πgnutls_x509_key_purposes_t pβ the key purposes. this is where the good stuff lands.unsigned int flagsβ should be zero. like, zero. that's it. that's the whole requirement.
β¨ DESCRIPTION β¨
okay so here's the vibe: this function will extract the key purposes out of the DER-encoded ExtKeyUsageSyntax PKIX extension you passed in, and drop them into a gnutls_x509_key_purposes_t type. iconic behavior honestly π₯
π real talk though: the data must be initialized. not optional. do that first or it's giving chaos.
π RETURNS π
on success you get GNUTLS_E_SUCCESS (which is 0, the good number, the slay number) π
otherwise? a negative error value. so like, if it's negative, something went wrong, and that's your sign π
β SINCE β
3.3.0 β she's been around a minute, lowkey a legend π
π REPORTING BUGS π
found a bug? don't be shy, 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. so like, go off, 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, no cap π
mwah! this one came from the gnutls manual, version 3.8.13, and yeah it's literally titled gnutls_x509_ext_import_key_purposes(3) β go forth and parse those key purposes, bestie π«Άβ¨
π¦ 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