diff options
author | schwarze <> | 2021-07-29 10:13:45 +0000 |
---|---|---|
committer | schwarze <> | 2021-07-29 10:13:45 +0000 |
commit | 478dc838cb27a358d6b5158ee627a40c0cf7a818 (patch) | |
tree | c8e9e3f4649f22b6d48e514d6766c15211108046 /src/lib | |
parent | 3914c181dd451be6f69fd1b4c96bac38ae4245a6 (diff) | |
download | openbsd-478dc838cb27a358d6b5158ee627a40c0cf7a818.tar.gz openbsd-478dc838cb27a358d6b5158ee627a40c0cf7a818.tar.bz2 openbsd-478dc838cb27a358d6b5158ee627a40c0cf7a818.zip |
Document X509_STORE_set_verify_func(3), mostly using text from the
OpenSSL 1.1.1 branch, which is still under a free license, tweaked
by me.
While here, garbage collect the weird BUGS section.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 | 40 |
1 files changed, 32 insertions, 8 deletions
diff --git a/src/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 b/src/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 index 052c28b6a8..59b1feff77 100644 --- a/src/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 +++ b/src/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 | |||
@@ -1,5 +1,6 @@ | |||
1 | .\" $OpenBSD: X509_STORE_set_verify_cb_func.3,v 1.9 2020/03/29 17:05:02 schwarze Exp $ | 1 | .\" $OpenBSD: X509_STORE_set_verify_cb_func.3,v 1.10 2021/07/29 10:13:45 schwarze Exp $ |
2 | .\" OpenSSL 05ea606a May 20 20:52:46 2016 -0400 | 2 | .\" full merge up to: OpenSSL 05ea606a May 20 20:52:46 2016 -0400 |
3 | .\" selective merge up to: OpenSSL 315c47e0 Dec 1 14:22:16 2020 +0100 | ||
3 | .\" | 4 | .\" |
4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 5 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. |
5 | .\" Copyright (c) 2009 The OpenSSL Project. All rights reserved. | 6 | .\" Copyright (c) 2009 The OpenSSL Project. All rights reserved. |
@@ -48,12 +49,13 @@ | |||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 49 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 50 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
50 | .\" | 51 | .\" |
51 | .Dd $Mdocdate: March 29 2020 $ | 52 | .Dd $Mdocdate: July 29 2021 $ |
52 | .Dt X509_STORE_SET_VERIFY_CB_FUNC 3 | 53 | .Dt X509_STORE_SET_VERIFY_CB_FUNC 3 |
53 | .Os | 54 | .Os |
54 | .Sh NAME | 55 | .Sh NAME |
55 | .Nm X509_STORE_set_verify_cb , | 56 | .Nm X509_STORE_set_verify_cb , |
56 | .Nm X509_STORE_set_verify_cb_func | 57 | .Nm X509_STORE_set_verify_cb_func , |
58 | .Nm X509_STORE_set_verify_func | ||
57 | .Nd set verification callback | 59 | .Nd set verification callback |
58 | .Sh SYNOPSIS | 60 | .Sh SYNOPSIS |
59 | .In openssl/x509_vfy.h | 61 | .In openssl/x509_vfy.h |
@@ -67,6 +69,11 @@ | |||
67 | .Fa "X509_STORE *st" | 69 | .Fa "X509_STORE *st" |
68 | .Fa "int (*verify_cb)(int ok, X509_STORE_CTX *ctx)" | 70 | .Fa "int (*verify_cb)(int ok, X509_STORE_CTX *ctx)" |
69 | .Fc | 71 | .Fc |
72 | .Ft void | ||
73 | .Fo X509_STORE_set_verify_func | ||
74 | .Fa "X509_STORE *st" | ||
75 | .Fa "int (*verify_func)(X509_STORE_CTX *ctx)" | ||
76 | .Fc | ||
70 | .Sh DESCRIPTION | 77 | .Sh DESCRIPTION |
71 | .Fn X509_STORE_set_verify_cb | 78 | .Fn X509_STORE_set_verify_cb |
72 | sets the verification callback of | 79 | sets the verification callback of |
@@ -86,17 +93,34 @@ structure when it is initialized. | |||
86 | This can be used to set the verification callback when the | 93 | This can be used to set the verification callback when the |
87 | .Vt X509_STORE_CTX | 94 | .Vt X509_STORE_CTX |
88 | is otherwise inaccessible (for example during S/MIME verification). | 95 | is otherwise inaccessible (for example during S/MIME verification). |
96 | .Pp | ||
97 | .Fn X509_STORE_set_verify_func | ||
98 | sets the final chain verification function for | ||
99 | .Fa st | ||
100 | to | ||
101 | .Fa verify_func . | ||
102 | Its purpose is to go through the chain of certificates and check | ||
103 | that all signatures are valid and that the current time is within | ||
104 | the limits of each certificate's first and last validity time. | ||
105 | The final chain verification function | ||
106 | must return 0 on failure and 1 on success. | ||
107 | If | ||
108 | .Fn X509_STORE_set_verify_func | ||
109 | is not called or called with | ||
110 | .Fa verify_func | ||
111 | set to a | ||
112 | .Dv NULL | ||
113 | pointer, the built-in default function is used. | ||
89 | .Sh SEE ALSO | 114 | .Sh SEE ALSO |
90 | .Xr X509_STORE_CTX_set_verify_cb 3 , | 115 | .Xr X509_STORE_CTX_set_verify_cb 3 , |
91 | .Xr X509_STORE_new 3 | 116 | .Xr X509_STORE_new 3 |
92 | .Sh HISTORY | 117 | .Sh HISTORY |
93 | .Fn X509_STORE_set_verify_cb_func | 118 | .Fn X509_STORE_set_verify_cb_func |
94 | first appeared in SSLeay 0.8.0 and has been available since | 119 | and |
120 | .Fn X509_STORE_set_verify_func | ||
121 | first appeared in SSLeay 0.8.0 and have been available since | ||
95 | .Ox 2.4 . | 122 | .Ox 2.4 . |
96 | .Pp | 123 | .Pp |
97 | .Fn X509_STORE_set_verify_cb | 124 | .Fn X509_STORE_set_verify_cb |
98 | first appeared in OpenSSL 1.0.0 and has been available since | 125 | first appeared in OpenSSL 1.0.0 and has been available since |
99 | .Ox 4.9 . | 126 | .Ox 4.9 . |
100 | .Sh BUGS | ||
101 | The macro version of this function was the only one available before | ||
102 | OpenSSL 1.0.0. | ||