gnutls_x509_crt_list_verify(3)

πŸ’– gnutls_x509_crt_list_verify(3) πŸ’–

okay bestie, sit down, hydrate, because we're about to verify a whole list of certificates and honestly? it's giving main character energy. this one lives in the gnutls manual and it's literally the API function that goes "hey, do these certs actually check out?" πŸ¦‹


✨ NAME ✨

gnutls_x509_crt_list_verify β€” API function

like, that's it, that's the whole name, she's an API function and she's booked and busy πŸ’…


✨ SYNOPSIS ✨

#include <gnutls/x509.h>

int gnutls_x509_crt_list_verify(const gnutls_x509_crt_t * cert_list,
unsigned cert_list_length, const gnutls_x509_crt_t * CA_list, unsigned
CA_list_length, const gnutls_x509_crl_t * CRL_list, unsigned
CRL_list_length, unsigned int flags, unsigned int * verify);

look at all those parameters, she's high maintenance but worth it 😭


✨ ARGUMENTS ✨

  • const gnutls_x509_crt_t * cert_list β€” the certificate list that's getting verified. the star of the show. the one under the microscope πŸ”
  • unsigned cert_list_length β€” how many certs are chillin' in cert_list. yes bestie, you have to count them yourself, that's the vibe.
  • const gnutls_x509_crt_t * CA_list β€” the CA list that's gonna be used in verification. these are the trust anchors, the adults in the room πŸ‘‘
  • unsigned CA_list_length β€” how many CA certificates are in CA_list. count again, sorry, that's just how it is.
  • const gnutls_x509_crl_t * CRL_list β€” holds a list of CRLs. (certificate revocation lists, iykyk)
  • unsigned CRL_list_length β€” the length of the CRL list. yes, a third count. we're counting, we're counting 🧚
  • unsigned int flags β€” flags that may be used to change the verification algorithm. use OR of the gnutls_certificate_verify_flags enumerations. that's your little knobs-and-dials moment, go wild ✨
  • unsigned int * verify β€” will hold the certificate verification output. this is where the tea gets spilled, lowkey β˜•

✨ DESCRIPTION ✨

so this function will try to verify the given certificate list and return its status. that's the whole assignment. the details of the verification are the same as in gnutls_x509_trust_list_verify_crt2(), so if you've met that one, you already know her sister 🌸

bestie, listen. you must check the peer's name in order to check if the verified certificate belongs to the actual peer. like, verifying the chain is NOT the same as knowing who you're talking to. do not skip this. this is the part people forget and then it's a whole situation 😭

the certificate verification output will be put in verify and will be one or more of the gnutls_certificate_status_t enumerated elements bitwise or'd. so it's a little combo platter of statuses πŸ“

for a more detailed verification status, use gnutls_x509_crt_verify() per list element. like, one by one, individually, with care. that's the deluxe treatment πŸ’…


✨ RETURNS ✨

on success, GNUTLS_E_SUCCESS (0) is returned. otherwise a negative error value. so like, if it's negative, something's not slaying, and you should go read up on your error codes 🫢


✨ REPORTING BUGS ✨

found a bug? don't just subtweet it, actually 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. so yes, share it, remix it, pass it to the group chat, 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/


and that's the whole page bestie!! πŸ’– this was gnutls version 3.8.13, page gnutls_x509_crt_list_verify(3), and honestly? she ate. go forth, verify those certificate lists, check those peer names, and stay iconic πŸ‘‘βœ¨πŸ¦‹

πŸ“¦ where this page comes from