]>
Commit | Line | Data |
---|---|---|
b8c182a4 DSH |
1 | =pod |
2 | ||
3 | =head1 NAME | |
4 | ||
186bb907 | 5 | X509_verify_cert - discover and verify X509 certificate chain |
b8c182a4 DSH |
6 | |
7 | =head1 SYNOPSIS | |
8 | ||
9 | #include <openssl/x509.h> | |
10 | ||
11 | int X509_verify_cert(X509_STORE_CTX *ctx); | |
12 | ||
13 | =head1 DESCRIPTION | |
14 | ||
15 | The X509_verify_cert() function attempts to discover and validate a | |
53246488 | 16 | certificate chain based on parameters in B<ctx>. A complete description of |
9b86974e | 17 | the process is contained in the L<verify(1)> manual page. |
b8c182a4 DSH |
18 | |
19 | =head1 RETURN VALUES | |
20 | ||
21 | If a complete chain can be built and validated this function returns 1, | |
22 | otherwise it return zero, in exceptional circumstances it can also | |
23 | return a negative code. | |
24 | ||
25 | If the function fails additional error information can be obtained by | |
26 | examining B<ctx> using, for example X509_STORE_CTX_get_error(). | |
27 | ||
28 | =head1 NOTES | |
29 | ||
30 | Applications rarely call this function directly but it is used by | |
31 | OpenSSL internally for certificate validation, in both the S/MIME and | |
32 | SSL/TLS code. | |
33 | ||
34 | The negative return value from X509_verify_cert() can only occur if no | |
aae41f8c MC |
35 | certificate is set in B<ctx> (due to a programming error); if X509_verify_cert() |
36 | twice without reinitialising B<ctx> in between; or if a retry | |
b8c182a4 DSH |
37 | operation is requested during internal lookups (which never happens with |
38 | standard lookup methods). It is however recommended that application check | |
39 | for <= 0 return value on error. | |
40 | ||
41 | =head1 BUGS | |
42 | ||
43 | This function uses the header B<x509.h> as opposed to most chain verification | |
b9b6a7e5 | 44 | functions which use B<x509_vfy.h>. |
b8c182a4 DSH |
45 | |
46 | =head1 SEE ALSO | |
47 | ||
9b86974e | 48 | L<X509_STORE_CTX_get_error(3)> |
b8c182a4 | 49 | |
b8c182a4 | 50 | =cut |