diff options
author | schwarze <> | 2021-11-16 14:07:57 +0000 |
---|---|---|
committer | schwarze <> | 2021-11-16 14:07:57 +0000 |
commit | 1e3c032a54098351c348cfd0269ea0030e6454eb (patch) | |
tree | 7462be89d547675cb2756ddcd401aa48bf7bdc14 /src/lib | |
parent | 56ed22a253a0763d163d6b3824960378ba6764d8 (diff) | |
download | openbsd-1e3c032a54098351c348cfd0269ea0030e6454eb.tar.gz openbsd-1e3c032a54098351c348cfd0269ea0030e6454eb.tar.bz2 openbsd-1e3c032a54098351c348cfd0269ea0030e6454eb.zip |
In x509_vfy.h rev. 1.37 and x509_vfy.c rev. 1.91, tb@ provided
X509_STORE_CTX_get_verify_cb(3); document it.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 | 55 |
1 files changed, 47 insertions, 8 deletions
diff --git a/src/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 b/src/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 index 5a4bb3338a..bf0c6af40d 100644 --- a/src/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 +++ b/src/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 | |||
@@ -1,8 +1,26 @@ | |||
1 | .\" $OpenBSD: X509_STORE_CTX_set_verify_cb.3,v 1.5 2020/03/29 17:05:02 schwarze Exp $ | 1 | .\" $OpenBSD: X509_STORE_CTX_set_verify_cb.3,v 1.6 2021/11/16 14:07:57 schwarze Exp $ |
2 | .\" OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400 | 2 | .\" full merge up to: OpenSSL a528d4f0 Oct 27 13:40:11 2015 -0400 |
3 | .\" selective merge up to: OpenSSL 24a535ea Sep 22 13:14:20 2020 +0100 | ||
3 | .\" | 4 | .\" |
4 | .\" This file was written by Dr. Stephen Henson <steve@openssl.org>. | 5 | .\" This file is a derived work. |
5 | .\" Copyright (c) 2009, 2016 The OpenSSL Project. All rights reserved. | 6 | .\" The changes are covered by the following Copyright and license: |
7 | .\" | ||
8 | .\" Copyright (c) 2021 Ingo Schwarze <schwarze@openbsd.org> | ||
9 | .\" | ||
10 | .\" Permission to use, copy, modify, and distribute this software for any | ||
11 | .\" purpose with or without fee is hereby granted, provided that the above | ||
12 | .\" copyright notice and this permission notice appear in all copies. | ||
13 | .\" | ||
14 | .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
15 | .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
16 | .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
17 | .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
18 | .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
19 | .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
20 | .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
21 | .\" | ||
22 | .\" The original file was written by Dr. Stephen Henson <steve@openssl.org>. | ||
23 | .\" Copyright (c) 2009 The OpenSSL Project. All rights reserved. | ||
6 | .\" | 24 | .\" |
7 | .\" Redistribution and use in source and binary forms, with or without | 25 | .\" Redistribution and use in source and binary forms, with or without |
8 | .\" modification, are permitted provided that the following conditions | 26 | .\" modification, are permitted provided that the following conditions |
@@ -48,12 +66,13 @@ | |||
48 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | 66 | .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED |
49 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. | 67 | .\" OF THE POSSIBILITY OF SUCH DAMAGE. |
50 | .\" | 68 | .\" |
51 | .Dd $Mdocdate: March 29 2020 $ | 69 | .Dd $Mdocdate: November 16 2021 $ |
52 | .Dt X509_STORE_CTX_SET_VERIFY_CB 3 | 70 | .Dt X509_STORE_CTX_SET_VERIFY_CB 3 |
53 | .Os | 71 | .Os |
54 | .Sh NAME | 72 | .Sh NAME |
55 | .Nm X509_STORE_CTX_set_verify_cb | 73 | .Nm X509_STORE_CTX_set_verify_cb , |
56 | .Nd set verification callback | 74 | .Nm X509_STORE_CTX_get_verify_cb |
75 | .Nd set and retrieve verification callback | ||
57 | .Sh SYNOPSIS | 76 | .Sh SYNOPSIS |
58 | .In openssl/x509_vfy.h | 77 | .In openssl/x509_vfy.h |
59 | .Ft void | 78 | .Ft void |
@@ -61,6 +80,11 @@ | |||
61 | .Fa "X509_STORE_CTX *ctx" | 80 | .Fa "X509_STORE_CTX *ctx" |
62 | .Fa "int (*verify_cb)(int ok, X509_STORE_CTX *ctx)" | 81 | .Fa "int (*verify_cb)(int ok, X509_STORE_CTX *ctx)" |
63 | .Fc | 82 | .Fc |
83 | .Ft int | ||
84 | .Fo "(*X509_STORE_CTX_get_verify_cb(X509_STORE_CTX *ctx))" | ||
85 | .Fa "int ok" | ||
86 | .Fa "X509_STORE_CTX *ctx" | ||
87 | .Fc | ||
64 | .Sh DESCRIPTION | 88 | .Sh DESCRIPTION |
65 | .Fn X509_STORE_CTX_set_verify_cb | 89 | .Fn X509_STORE_CTX_set_verify_cb |
66 | sets the verification callback of | 90 | sets the verification callback of |
@@ -73,7 +97,7 @@ The verification callback can be used to customise the operation of | |||
73 | certificate verification, either by overriding error conditions or | 97 | certificate verification, either by overriding error conditions or |
74 | logging errors for debugging purposes. | 98 | logging errors for debugging purposes. |
75 | .Pp | 99 | .Pp |
76 | However a verification callback is | 100 | However, a verification callback is |
77 | .Sy not | 101 | .Sy not |
78 | essential and the default operation is often sufficient. | 102 | essential and the default operation is often sufficient. |
79 | .Pp | 103 | .Pp |
@@ -108,6 +132,17 @@ In some cases (such as S/MIME verification) the | |||
108 | structure is created and destroyed internally and the only way to set a | 132 | structure is created and destroyed internally and the only way to set a |
109 | custom verification callback is by inheriting it from the associated | 133 | custom verification callback is by inheriting it from the associated |
110 | .Vt X509_STORE . | 134 | .Vt X509_STORE . |
135 | .Sh RETURN VALUES | ||
136 | .Fn X509_STORE_CTX_get_verify_cb | ||
137 | returns a pointer to the current callback function | ||
138 | used by the specified | ||
139 | .Fa ctx . | ||
140 | If no callback was set using | ||
141 | .Fn X509_STORE_CTX_set_verify_cb , | ||
142 | that is a pointer to a built-in static function | ||
143 | which does nothing except returning the | ||
144 | .Fa ok | ||
145 | argument passed to it. | ||
111 | .Sh EXAMPLES | 146 | .Sh EXAMPLES |
112 | Default callback operation: | 147 | Default callback operation: |
113 | .Bd -literal | 148 | .Bd -literal |
@@ -223,6 +258,10 @@ verify_callback(int ok, X509_STORE_CTX *ctx) | |||
223 | .Fn X509_STORE_CTX_set_verify_cb | 258 | .Fn X509_STORE_CTX_set_verify_cb |
224 | first appeared in OpenSSL 0.9.6c and has been available since | 259 | first appeared in OpenSSL 0.9.6c and has been available since |
225 | .Ox 3.2 . | 260 | .Ox 3.2 . |
261 | .Pp | ||
262 | .Fn X509_STORE_CTX_get_verify_cb | ||
263 | first appeared in OpenSSL 1.1.0 and has been available since | ||
264 | .Ox 7.1 . | ||
226 | .Sh CAVEATS | 265 | .Sh CAVEATS |
227 | In general a verification callback should | 266 | In general a verification callback should |
228 | .Sy NOT | 267 | .Sy NOT |