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, periodtunsigned int flagsβ either zero, or an OR list ofgnutls_certificate_verify_flagsπconst gnutls_datum_t * dataβ this one holds the signed data, the actual goodsconst 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_FAILEDback π - if the certificate is expired you get
GNUTLS_E_EXPIRED, and if it's not yet activated you getGNUTLS_E_NOT_YET_ACTIVATEDπ - on success you get zero or a positive code. we love a happy ending π
heads up bestie: since GnuTLS3.5.6this 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 π
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
- 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