GNUTLS_X509_TRUST_LIST_GET_ISSUER(3)

πŸ’– NAME πŸ’–

gnutls_x509_trust_list_get_issuer β€” the API function that finds who signed your cert, bestie

So this is a page from the gnutls manual, and it's all about tracking down the issuer of a certificate. It's giving detective energy fr fr πŸ•΅οΈβ™€οΈ


✨ SYNOPSIS ✨

#include <gnutls/x509.h>

int gnutls_x509_trust_list_get_issuer(gnutls_x509_trust_list_t list,
gnutls_x509_crt_t cert, gnutls_x509_crt_t * issuer, unsigned int flags);

🌸 ARGUMENTS 🌸

  • gnutls_x509_trust_list_t list β€” the list. That's it, that's the whole vibe, it's the trust list you're digging through πŸ’…
  • gnutls_x509_crt_t cert β€” the certificate you want the issuer for. Your main character cert, basically πŸ‘‘
  • gnutls_x509_crt_t * issuer β€” this is where the issuer lands if there is one. Important: you gotta treat it as constant unless GNUTLS_TL_GET_COPY is set in flags. No touching otherwise πŸ™ˆ
  • unsigned int flags β€” flags from gnutls_trust_list_flags_t. And heads up, GNUTLS_TL_GET_COPY is the one that's applicable here πŸŽ€

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so here's the tea: this function finds the issuer of the certificate you hand it. Simple. Iconic. No cap. ⭐

But listen β€” if the flag GNUTLS_TL_GET_COPY is specified, you get back a copy of the issuer, and you must free it with gnutls_x509_crt_deinit(). And in that case, the issuer you passed in must not be initialized. Not even a little. Don't do it 🫢

Lowkey a big deal: the GNUTLS_TL_GET_COPY flag is required for this function to work with PKCS11 trust lists in a thread-safe way. So if you're doing PKCS11 + threads and you skipped that flag, that's on you bestie 😭

πŸ”₯ RETURNS πŸ”₯

If everything slays, you get GNUTLS_E_SUCCESS (0) back. If not, it's a negative error value. Negative = not the vibe πŸ’€


🌈 SINCE 🌈

3.0 β€” she's been here since 3.0 and she's been serving ever since ✨


πŸ’œ REPORTING BUGS πŸ’œ

Found a bug? Don't suffer in silence, tell the gnutls girlies:


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: go off, remix it, 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/


That's the whole page bestie, you ate it πŸ“ and btw this was the gnutls 3.8.13 era of the man page β€” thanks for reading, mwah πŸ’–

πŸ“¦ where this page comes from