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 in CA_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 the gnutls_certificate_verify_flags enumerations. 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 Β© 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