gnutls_x509_crt_verify_data2(3)

πŸ’– gnutls_x509_crt_verify_data2 β€” the tea on verifying signatures πŸ’–

okay so bestie, welcome to the gnutls manual, section 3, and today's main character is gnutls_x509_crt_verify_data2. grab a boba, we're checking whether some signed data actually matches a certificate. no cap. πŸŽ€


✨ NAME ✨

gnutls_x509_crt_verify_data2 β€” it's an API function, and it's here to verify stuff for you πŸ’…


🌸 SYNOPSIS 🌸

#include <gnutls/x509.h>

int gnutls_x509_crt_verify_data2(gnutls_x509_crt_t crt,
gnutls_sign_algorithm_t algo, unsigned int flags, const gnutls_datum_t *
data, const gnutls_datum_t * signature);

like... look at her. iconic signature. 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • gnutls_x509_crt_t crt β€” the certificate we're verifying with, she's the one holding the receipts ✨
  • gnutls_sign_algorithm_t algo β€” the signature algorithm that got used, periodt
  • unsigned int flags β€” either zero, or an OR list of gnutls_certificate_verify_flags πŸ’…
  • const gnutls_datum_t * data β€” this one holds the signed data, the actual goods
  • const gnutls_datum_t * signature β€” and this one contains the signature πŸŽ€

πŸ”₯ DESCRIPTION πŸ”₯

so what does she DO? she will verify the given signed data, using the parameters from the certificate. that's it, that's the vibe check. ✨


πŸ’€ RETURNS πŸ’€

okay this part matters, don't skip it:

  • if the verification fails, you get GNUTLS_E_PK_SIG_VERIFY_FAILED back 😭
  • if the certificate is expired you get GNUTLS_E_EXPIRED, and if it's not yet activated you get GNUTLS_E_NOT_YET_ACTIVATED πŸ™ˆ
  • on success you get zero or a positive code. we love a happy ending πŸ’–
heads up bestie: since GnuTLS 3.5.6 this function introduces checks in the end certificate ( crt ), including time checks and key usage checks. so like, she's thorough now. πŸ‘‘

🌈 SINCE 🌈

3.4.0 β€” she's been around, she's a legend, lowkey a veteran πŸ‘‘


πŸ“ REPORTING BUGS πŸ“

found a bug? don't be shy, 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. (translation: share her, just keep the credits, it's giving generous fr fr 🫢)


⭐ 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 3.8.13 energy, served fresh, no cap. go verify something and slay βœ¨πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from