1gnutls_pkcs7_verify_direct(3) gnutls gnutls_pkcs7_verify_direct(3)
2
3
4
6 gnutls_pkcs7_verify_direct - API function
7
9 #include <gnutls/pkcs7.h>
10
11 int gnutls_pkcs7_verify_direct(gnutls_pkcs7_t pkcs7, gnutls_x509_crt_t
12 signer, unsigned idx, const gnutls_datum_t * data, unsigned flags);
13
15 gnutls_pkcs7_t pkcs7
16 should contain a gnutls_pkcs7_t type
17
18 gnutls_x509_crt_t signer
19 the certificate believed to have signed the structure
20
21 unsigned idx
22 the index of the signature info to check
23
24 const gnutls_datum_t * data
25 The data to be verified or NULL
26
27 unsigned flags
28 Zero or an OR list of gnutls_certificate_verify_flags
29
31 This function will verify the provided data against the signature
32 present in the SignedData of the PKCS 7 structure. If the data provided
33 are NULL then the data in the encapsulatedContent field will be used
34 instead.
35
36 Note that, unlike gnutls_pkcs7_verify() this function does not verify
37 the key purpose of the signer. It is expected for the caller to verify
38 the intended purpose of the signer -e.g., via
39 gnutls_x509_crt_get_key_purpose_oid(), or
40 gnutls_x509_crt_check_key_purpose().
41
42 Note also, that since GnuTLS 3.5.6 this function introduces checks in
43 the end certificate ( signer ), including time checks and key usage
44 checks.
45
47 On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a negative er‐
48 ror value. A verification error results to a GNUTLS_E_PK_SIG_VER‐
49 IFY_FAILED and the lack of encapsulated data to verify to a
50 GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE.
51
53 3.4.2
54
56 Report bugs to <bugs@gnutls.org>.
57 Home page: https://www.gnutls.org
58
59
61 Copyright © 2001- Free Software Foundation, Inc., and others.
62 Copying and distribution of this file, with or without modification,
63 are permitted in any medium without royalty provided the copyright no‐
64 tice and this notice are preserved.
65
67 The full documentation for gnutls is maintained as a Texinfo manual.
68 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
69 visit
70
71 https://www.gnutls.org/manual/
72
73gnutls 3.7.6 gnutls_pkcs7_verify_direct(3)