1 | =pod
|
---|
2 |
|
---|
3 | =head1 NAME
|
---|
4 |
|
---|
5 | X509_verify_cert - discover and verify X509 certificate 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>. A complete description of
|
---|
17 | the process is contained in the L<verify(1)> manual page.
|
---|
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 | A negative return value from X509_verify_cert() can occur if it is invoked
|
---|
35 | incorrectly, such as with no certificate set in B<ctx>, or when it is called
|
---|
36 | twice in succession without reinitialising B<ctx> for the second call.
|
---|
37 | A negative return value can also happen due to internal resource problems or if
|
---|
38 | a retry operation is requested during internal lookups (which never happens
|
---|
39 | with standard lookup methods).
|
---|
40 | Applications must check for <= 0 return value on error.
|
---|
41 |
|
---|
42 | =head1 BUGS
|
---|
43 |
|
---|
44 | This function uses the header B<x509.h> as opposed to most chain verification
|
---|
45 | functions which use B<x509_vfy.h>.
|
---|
46 |
|
---|
47 | =head1 SEE ALSO
|
---|
48 |
|
---|
49 | L<X509_STORE_CTX_get_error(3)>
|
---|
50 |
|
---|
51 | =head1 COPYRIGHT
|
---|
52 |
|
---|
53 | Copyright 2009-2016 The OpenSSL Project Authors. All Rights Reserved.
|
---|
54 |
|
---|
55 | Licensed under the OpenSSL license (the "License"). You may not use
|
---|
56 | this file except in compliance with the License. You can obtain a copy
|
---|
57 | in the file LICENSE in the source distribution or at
|
---|
58 | L<https://www.openssl.org/source/license.html>.
|
---|
59 |
|
---|
60 | =cut
|
---|