gnutls_pkcs7_verify_direct(3)
π gnutls_pkcs7_verify_direct π
okay so bestie, welcome to the manual page for gnutls_pkcs7_verify_direct, a lil' function from the gnutls crew. it lives in the gnutls family of man pages (you know, the ones you man when you're deep in TLS land at 2am π). let's get into it, no cap.
β¨ NAME β¨
gnutls_pkcs7_verify_direct β it's an API function, bestie. that's the whole vibe. π
πΈ SYNOPSIS πΈ
#include <gnutls/pkcs7.h>
int gnutls_pkcs7_verify_direct(gnutls_pkcs7_t pkcs7, gnutls_x509_crt_t
signer, unsigned idx, const gnutls_datum_t * data, unsigned flags);
yes the signature is long, we're not even gonna pretend it's not π
π¦ ARGUMENTS π¦
gnutls_pkcs7_t pkcs7β this should contain agnutls_pkcs7_ttype. like, it's gotta be the right kinda thing or we're not doing anything.gnutls_x509_crt_t signerβ the certificate that you believe signed the structure. you're bringing your theory, this function is checking your homework.unsigned idxβ the index of the signature info you want checked. pick your fighter π₯const gnutls_datum_t * dataβ the data that needs verifying, orNULL.unsigned flagsβ zero, or an OR list ofgnutls_certificate_verify_flags. your settings, your rules β¨
π DESCRIPTION π
so what does this icon actually do? it verifies the data you handed over against the signature that's chillin' inside the SignedData of the PKCS 7 structure. and here's the tea: if the data you provided is NULL, then it just uses the data sitting in the encapsulatedContent field instead. convenient, honestly. π
note that, unlikegnutls_pkcs7_verify(), this function does not verify the key purpose of the signer. so it's fully on the caller β that's you, bestie β to verify the intended purpose of the signer-e.g.,viagnutls_x509_crt_get_key_purpose_oid(), orgnutls_x509_crt_check_key_purpose(). don't skip that step, i'm literally begging π
also, since GnuTLS 3.5.6 this function introduces checks in the end certificate ( signer ), including time checks and key usage checks. so it's giving thorough. it's giving responsible. we love that for us. π
β RETURNS β
- on success,
GNUTLS_E_SUCCESS(0) is returned π - otherwise you get a negative error value (rip)
- a verification error results in a
GNUTLS_E_PK_SIG_VERIFY_FAILED - and if there's no encapsulated data to verify, you get a
GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE
basically: zero = slay, negative = go read the error, bestie. π
π SINCE π
3.4.2 β an oldie but a goodie, it's been serving since way back. π
π REPORTING BUGS π
found a bug? don't gatekeep it, 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.
π 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, page gnutls_pkcs7_verify_direct(3), and you can find it hanging out in the gnutls section 3 man pages. go verify something responsibly, 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