gnutls_x509_key_purpose_get(3)
π gnutls_x509_key_purpose_get(3) π
okay bestie, welcome to the gnutls manual β yes, the whole thing, and yes, we're doing this one together. this page is about gnutls_x509_key_purpose_get, an API function, and it's lowkey one of the cutest little getters in the x509 extended world. let's go π¦
β¨ NAME β¨
gnutls_x509_key_purpose_get β API function
(it gets a key purpose. that's the whole vibe. main character of exactly one job π)
πΈ SYNOPSIS πΈ
#include <gnutls/x509-ext.h>
int gnutls_x509_key_purpose_get(gnutls_x509_key_purposes_t p, unsigned
idx, gnutls_datum_t * oid);
like, there it is. the whole thing. no cap. β¨
π ARGUMENTS π
gnutls_x509_key_purposes_t pβ the key purposes, bestie. the whole lil collection you're digging through. πunsigned idxβ the index of the key purpose you wanna retrieve. yes, you gotta know which one you want, it's not gonna read your mind. πgnutls_datum_t * oidβ will hold the object identifier of the key purpose. and listen β it's to be treated as constant, so don't you dare go modifying it, okay? look respectfully. π
π DESCRIPTION π
so this function will retrieve the specified-by-the-index key purpose inside the purposes type. literally: you hand it p and idx, it hands you back the oid for that one.
and the object identifier? it'll be a null terminated string. iconic behavior, honestly. π
β RETURNS β
- on success,
GNUTLS_E_SUCCESS(0) is returned β slay, everything worked π GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLEif the index is out of bounds β i.e. you asked for a key purpose that simply does not exist, bestie, and that's a you problem π- otherwise a negative error value β yeah. something went sideways. π
π¦ SINCE π¦
3.3.0 β so this has been around a while, it's a seasoned queen π
π§ REPORTING BUGS π§
found a bug? don't suffer in silence, tell the people:
- 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.
(translation: share it, remix it, just keep the receipt. π«Ά)
π 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/
okay that's the whole page, and honestly? she ate. π
β¨ this was the gnutls manual, version 3.8.13, dated with the gnutls_x509_key_purpose_get(3) page itself β so if you need me, i'll be right here in /usr/share/doc/gnutls/. bye bestie, go read your oids responsibly ππ¦π
π¦ 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