gnutls_x509_crt_verify(3)
π gnutls_x509_crt_verify π
okay bestie, so we're in the gnutls manual and this lil page is all about gnutls_x509_crt_verify(3) β the API function that checks whether a certificate is actually, like, valid. no cap. let's get into it β¨
πΈ NAME πΈ
gnutls_x509_crt_verify β it's an API function, and it's here to verify a certificate for you π
π¦ SYNOPSIS π¦
#include <gnutls/x509.h>
int gnutls_x509_crt_verify(gnutls_x509_crt_t cert, const
gnutls_x509_crt_t * CA_list, unsigned CA_list_length, unsigned int
flags, unsigned int * verify);
yes she's a whole signature, and yes every single type matters, so don't come for me about const π
π ARGUMENTS π
gnutls_x509_crt_t certβ this is the certificate, the one getting verified. main character energy, truly πconst gnutls_x509_crt_t * CA_listβ a certificate that's considered a trusted one. it's giving "the authority we believe in" fr fr.unsigned CA_list_lengthβ holds the number of CA certificates inCA_list. so like, how many trusted ones you're handing over π«Άunsigned int flagsβ flags that may be used to change the verification algorithm. use OR of thegnutls_certificate_verify_flagsenumerations. mix and match, babes πunsigned int * verifyβ will hold the certificate verification output. this is where the tea gets poured β
π DESCRIPTION π
so basically, this function will try to verify the given certificate and return its status. and here's the plot twist you need to hear:
a verification error does not imply a negative return status. in that case the verify status is set. π
like, read that again. the return value and the verify output are two different things, and confusing them is a whole tragedy. don't do it bestie.
the details of the verification are the same as in gnutls_x509_trust_list_verify_crt2(). literally identical behavior, just a different front door β¨
β RETURNS β
on success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative error value. slay when it's zero, sad when it's negative, that's just the vibe check π
π REPORTING BUGS π
found a bug? don't suffer in silence, report it 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. periodt. π
π 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/
go forth and read, my love π§
and that's the whole page, bestie!! this gorgeous lil manpage comes from gnutls 3.8.13, and it lives as gnutls_x509_crt_verify(3). 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