gnutls_system_key_iter_get_info(3)
β¨ NAME β¨
gnutls_system_key_iter_get_info β bestie, this is an API function π
It lives in the gnutls manual, section 3, and it's the girl that walks you through your system's cert-and-key pairs one at a time. Slay.
πΈ SYNOPSIS πΈ
#include <gnutls/system-keys.h>
int gnutls_system_key_iter_get_info(gnutls_system_key_iter_t * iter,
unsigned cert_type, char ** cert_url, char ** key_url, char ** label,
gnutls_datum_t * der, unsigned int flags);
π ARGUMENTS π
gnutls_system_key_iter_t * iterβ the iterator for your system keys. Heads up: it must be set toNULLat the start. Like, actuallyNULL. Don't be cute about it.unsigned cert_typeβ a value ofgnutls_certificate_type_tthat says which type of certificate you're hunting for.char ** cert_urlβ the certificate URL of the pair (this one may beNULL).char ** key_urlβ the key URL of the pair (also may beNULL).char ** labelβ the friendly name (if there even is one) of the pair (again, may beNULL).gnutls_datum_t * derβ if it's non-NULL, you get the DER data of the certificate.unsigned int flagsβ should be zero. That's it. Zero. Periodt.
π¦ DESCRIPTION π¦
Okay so here's the vibe: every time you call this function, it hands you back a certificate and key pair's URLs, plus a label that's associated with them, plus the DER-encoded certificate. Iconic. And when the iteration is all done and there's nothing left to give? It returns GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE. It's giving "we're out of girls, go home." π
Typically, cert_type should be GNUTLS_CRT_X509.
All values set are allocated and must be cleared using gnutls_free(), β yes, every single one, no leaving them hanging, that's a memory leak and we don't do that here π«Ά
π RETURNS π
On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. Simple as that, no cap. β¨
β SINCE β
3.4.0 β she's been around, she's a legacy icon π
π REPORTING BUGS π
Found a bug? Don't suffer in silence, bestie β 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.
π₯ 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, dated with the gnutls crew's blessing, and it's the manual entry for gnutls_system_key_iter_get_info(3). Go forth and iterate 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