Debian Codegraph @

doc/functions/dane_verify_crt

raw
1
2
3
4
5 @deftypefun {int} {dane_verify_crt} (dane_state_t @var{s}, const gnutls_datum_t * @var{chain}, unsigned @var{chain_size}, gnutls_certificate_type_t @var{chain_type}, const char * @var{hostname}, const char * @var{proto}, unsigned int @var{port}, unsigned int @var{sflags}, unsigned int @var{vflags}, unsigned int * @var{verify})
6 @var{s}: A DANE state structure (may be NULL)
7
8 @var{chain}: A certificate chain
9
10 @var{chain_size}: The size of the chain
11
12 @var{chain_type}: The type of the certificate chain
13
14 @var{hostname}: The hostname associated with the chain
15
16 @var{proto}: The protocol of the service connecting (e.g. tcp)
17
18 @var{port}: The port of the service connecting (e.g. 443)
19
20 @var{sflags}: Flags for the initialization of @code{s} (if NULL)
21
22 @var{vflags}: Verification flags; an OR'ed list of @code{dane_verify_flags_t} .
23
24 @var{verify}: An OR'ed list of @code{dane_verify_status_t} .
25
26 This function will verify the given certificate chain against the
27 CA constrains and/or the certificate available via DANE.
28 If no information via DANE can be obtained the flag @code{DANE_VERIFY_NO_DANE_INFO}
29 is set. If a DNSSEC signature is not available for the DANE
30 record then the verify flag @code{DANE_VERIFY_NO_DNSSEC_DATA} is set.
31
32 Due to the many possible options of DANE, there is no single threat
33 model countered. When notifying the user about DANE verification results
34 it may be better to mention: DANE verification did not reject the certificate,
35 rather than mentioning a successful DANE verification.
36
37 Note that this function is designed to be run in addition to
38 PKIX - certificate chain - verification. To be run independently
39 the @code{DANE_VFLAG_ONLY_CHECK_EE_USAGE} flag should be specified;
40 then the function will check whether the key of the peer matches the
41 key advertised in the DANE entry.
42
43 @strong{Returns:} a negative error code on error and @code{DANE_E_SUCCESS} (0)
44 when the DANE entries were successfully parsed, irrespective of
45 whether they were verified (see @code{verify} for that information). If
46 no usable entries were encountered @code{DANE_E_REQUESTED_DATA_NOT_AVAILABLE}
47 will be returned.
48 @end deftypefun