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 unlessGNUTLS_TL_GET_COPYis set inflags. No touching otherwise πunsigned int flagsβ flags fromgnutls_trust_list_flags_t. And heads up,GNUTLS_TL_GET_COPYis 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:
- 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: 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
- 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