GNUTLS_X509_TRUST_LIST_ADD_NAMED_CRT(3)
π NAME π
gnutls_x509_trust_list_add_named_crt β it's an API function, bestie, and it's giving "let me introduce you to a very specific trusted cert" energy β¨
This page lives in section 3 of the gnutls manual, so you already know it's a library call and not a command you type into your shell. π«Ά
πΈ SYNOPSIS πΈ
#include <gnutls/x509.h>
int gnutls_x509_trust_list_add_named_crt(gnutls_x509_trust_list_t list,
gnutls_x509_crt_t cert, const void * name, size_t name_size, unsigned
int flags);
π ARGUMENTS π
gnutls_x509_trust_list_t listβ the list. Your trust list. The main character of this whole situation. πgnutls_x509_crt_t certβ a certificate. Just a cert, living its life, about to get a name tag. π·οΈconst void * nameβ an identifier for the certificate. This is the name you're matching it to, iykyk.size_t name_sizeβ the size of the identifier. Becausenameis avoid *and nobody's counting for you. πunsigned int flagsβ should be0. That's it. That's the whole vibe. Zero. β
π¦ DESCRIPTION π¦
Okay so here's the tea: this function will add the given certificate to the trusted list and associate it with a name. Not just "trusted, periodt" β trusted for that specific name. π
Here's the important part though, so don't skip it: the certificate will not be used for verification with gnutls_x509_trust_list_verify_crt(). Nope. Instead it gets used with gnutls_x509_trust_list_verify_named_crt() β or with gnutls_x509_trust_list_verify_crt2(), but that one only since GnuTLS 3.4.0, and only if a hostname is provided. Noted, bestie. π
In principle, this function can be used to set individual "server" certificates that are trusted by the user for that specific server but for no other purposes. So likeβ¦ one cert, one server, exclusive relationship. No sharing. π«
The certificatecertmust not be deinitialized during the lifetime of thelist. Like, do not. It has to stay alive the whole time or everything falls apart. π
π RETURNS π
On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. So if you get a negative number back, that's your sign something went sideways. π
β SINCE β
3.0.0 β old money, honestly. Iconic since day one. π
π REPORTING BUGS π
Found a bug? Report it to <bugs@gnutls.org>. They want to hear from you, fr fr. π
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. Slay, honestly β free to share, 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 β gnutls version 3.8.13, straight from the gnutls_x509_tru...t_add_named_crt(3) corner of the manual. Go forth and name your certs 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