summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/man/X509_verify_cert.3
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/man/X509_verify_cert.3')
-rw-r--r--src/lib/libcrypto/man/X509_verify_cert.354
1 files changed, 54 insertions, 0 deletions
diff --git a/src/lib/libcrypto/man/X509_verify_cert.3 b/src/lib/libcrypto/man/X509_verify_cert.3
new file mode 100644
index 0000000000..fd3d6bebda
--- /dev/null
+++ b/src/lib/libcrypto/man/X509_verify_cert.3
@@ -0,0 +1,54 @@
1.Dd $Mdocdate: November 4 2016 $
2.Dt X509_VERIFY_CERT 3
3.Os
4.Sh NAME
5.Nm X509_verify_cert
6.Nd discover and verify X509 certificate chain
7.Sh SYNOPSIS
8.In openssl/x509.h
9.Ft int
10.Fo X509_verify_cert
11.Fa "X509_STORE_CTX *ctx"
12.Fc
13.Sh DESCRIPTION
14The
15.Fn X509_verify_cert
16function attempts to discover and validate a certificate chain based on
17parameters in
18.Fa ctx .
19.Pp
20Applications rarely call this function directly, but it is used by
21OpenSSL internally for certificate validation, in both the S/MIME and
22SSL/TLS code.
23.Sh RETURN VALUES
24If a complete chain can be built and validated this function returns 1,
25otherwise it return 0.
26.Pp
27In exceptional circumstances, it can also return a negative code,
28but only if no certificate is set in
29.Fa ctx
30due to a programming error or if a retry operation is requested
31during internal lookups, which never happens with standard lookup
32methods.
33It is however recommended that application check for <= 0 return
34value on error.
35.Pp
36If the function fails, additional error information can be obtained
37by examining
38.Fa ctx ,
39for example using
40.Xr X509_STORE_CTX_get_error 3 .
41.Sh SEE ALSO
42.Xr X509_STORE_CTX_get_error 3
43and the
44.Cm verify
45entry in
46.Xr openssl 1
47.Sh HISTORY
48.Fn X509_verify_cert
49is available in all versions of SSLeay and OpenSSL.
50.Sh BUGS
51This function uses the header
52.In openssl/x509.h
53as opposed to most chain verification functions which use
54.In openssl/x509_vfy.h .