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 to NULL at the start. Like, actually NULL. Don't be cute about it.
  • unsigned cert_type β€” a value of gnutls_certificate_type_t that says which type of certificate you're hunting for.
  • char ** cert_url β€” the certificate URL of the pair (this one may be NULL).
  • char ** key_url β€” the key URL of the pair (also may be NULL).
  • char ** label β€” the friendly name (if there even is one) of the pair (again, may be NULL).
  • 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 Β© 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