Manual page for X509_verify_cert()
[openssl.git] / doc / crypto / X509_verify_cert.pod
1 =pod
2
3 =head1 NAME
4
5 X509_verify_cert - discover and verify X509 certificte chain
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
16 certificate chain based on parameters in B<ctx>.
17
18 =head1 RETURN VALUES
19
20 If a complete chain can be built and validated this function returns 1,
21 otherwise it return zero, in exceptional circumstances it can also
22 return a negative code.
23
24 If the function fails additional error information can be obtained by
25 examining B<ctx> using, for example X509_STORE_CTX_get_error().
26
27 =head1 NOTES
28
29 Applications rarely call this function directly but it is used by
30 OpenSSL internally for certificate validation, in both the S/MIME and
31 SSL/TLS code.
32
33 The negative return value from X509_verify_cert() can only occur if no
34 certificate is set in B<ctx> (due to a programming error) or if a retry
35 operation is requested during internal lookups (which never happens with
36 standard lookup methods). It is however recommended that application check
37 for <= 0 return value on error.
38
39 =head1 BUGS
40
41 This function uses the header B<x509.h> as opposed to most chain verification
42 functiosn which use B<x509_vfy.h>.
43
44 =head1 SEE ALSO
45
46 L<X509_STORE_CTX_get_error(3)|X509_STORE_CTX_get_error(3)>
47
48 =head1 HISTORY
49
50 X509_verify_cert() is available in all versions of SSLeay and OpenSSL.
51
52 =cut