1gnutls_x509_trust_list_verify_crt2(3)gnutlsgnutls_x509_trust_list_verify_crt2(3)
2
3
4
6 gnutls_x509_trust_list_verify_crt2 - API function
7
9 #include <gnutls/x509.h>
10
11 int gnutls_x509_trust_list_verify_crt2(gnutls_x509_trust_list_t list,
12 gnutls_x509_crt_t * cert_list, unsigned int cert_list_size,
13 gnutls_typed_vdata_st * data, unsigned int elements, unsigned int
14 flags, unsigned int * voutput, gnutls_verify_output_function func);
15
17 gnutls_x509_trust_list_t list
18 The list
19
20 gnutls_x509_crt_t * cert_list
21 is the certificate list to be verified
22
23 unsigned int cert_list_size
24 is the certificate list size
25
26 gnutls_typed_vdata_st * data
27 an array of typed data
28
29 unsigned int elements
30 the number of data elements
31
32 unsigned int flags
33 Flags that may be used to change the verification algo‐
34 rithm. Use OR of the gnutls_certificate_verify_flags enu‐
35 merations.
36
37 unsigned int * voutput
38 will hold the certificate verification output.
39
40 gnutls_verify_output_function func
41 If non-null will be called on each chain element verifica‐
42 tion with the output.
43
45 This function will attempt to verify the given certificate chain and
46 return its status. The voutput parameter will hold an OR'ed sequence
47 of gnutls_certificate_status_t flags.
48
49 When a certificate chain of cert_list_size with more than one certifi‐
50 cates is provided, the verification status will apply to the first cer‐
51 tificate in the chain that failed verification. The verification
52 process starts from the end of the chain (from CA to end certificate).
53 The first certificate in the chain must be the end-certificate while
54 the rest of the members may be sorted or not.
55
56 Additionally a certificate verification profile can be specified from
57 the ones in gnutls_certificate_verification_profiles_t by ORing the
58 result of GNUTLS_PROFILE_TO_VFLAGS() to the verification flags.
59
60 Additional verification parameters are possible via the data types;
61 the acceptable types are GNUTLS_DT_DNS_HOSTNAME, GNUTLS_DT_IP_ADDRESS
62 and GNUTLS_DT_KEY_PURPOSE_OID. The former accepts as data a null-ter‐
63 minated hostname, and the latter a null-terminated object identifier
64 (e.g., GNUTLS_KP_TLS_WWW_SERVER). If a DNS hostname is provided then
65 this function will compare the hostname in the end certificate against
66 the given. If names do not match the GNUTLS_CERT_UNEXPECTED_OWNER sta‐
67 tus flag will be set. In addition it will consider certificates pro‐
68 vided with gnutls_x509_trust_list_add_named_crt().
69
70 If a key purpose OID is provided and the end-certificate contains the
71 extended key usage PKIX extension, it will be required to match the
72 provided OID or be marked for any purpose, otherwise verification will
73 fail with GNUTLS_CERT_PURPOSE_MISMATCH status.
74
76 On success, GNUTLS_E_SUCCESS [22m(0) is returned, otherwise a negative
77 error value. Note that verification failure will not result to an error
78 code, only voutput will be updated.
79
81 3.3.8
82
84 Report bugs to <bugs@gnutls.org>.
85 Home page: http://www.gnutls.org
86
87
89 Copyright © 2001-2018 Free Software Foundation, Inc., and others.
90 Copying and distribution of this file, with or without modification,
91 are permitted in any medium without royalty provided the copyright
92 notice and this notice are preserved.
93
95 The full documentation for gnutls is maintained as a Texinfo manual.
96 If the /usr/share/doc/gnutls/ directory does not contain the HTML form
97 visit
98
99 http://www.gnutls.org/manual/
100
101gnutls 3.6.5gnutls_x509_trust_list_verify_crt2(3)