summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorschwarze <>2021-11-16 14:07:57 +0000
committerschwarze <>2021-11-16 14:07:57 +0000
commit1e3c032a54098351c348cfd0269ea0030e6454eb (patch)
tree7462be89d547675cb2756ddcd401aa48bf7bdc14 /src/lib
parent56ed22a253a0763d163d6b3824960378ba6764d8 (diff)
downloadopenbsd-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.355
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
66sets the verification callback of 90sets the verification callback of
@@ -73,7 +97,7 @@ The verification callback can be used to customise the operation of
73certificate verification, either by overriding error conditions or 97certificate verification, either by overriding error conditions or
74logging errors for debugging purposes. 98logging errors for debugging purposes.
75.Pp 99.Pp
76However a verification callback is 100However, a verification callback is
77.Sy not 101.Sy not
78essential and the default operation is often sufficient. 102essential and the default operation is often sufficient.
79.Pp 103.Pp
@@ -108,6 +132,17 @@ In some cases (such as S/MIME verification) the
108structure is created and destroyed internally and the only way to set a 132structure is created and destroyed internally and the only way to set a
109custom verification callback is by inheriting it from the associated 133custom 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
137returns a pointer to the current callback function
138used by the specified
139.Fa ctx .
140If no callback was set using
141.Fn X509_STORE_CTX_set_verify_cb ,
142that is a pointer to a built-in static function
143which does nothing except returning the
144.Fa ok
145argument passed to it.
111.Sh EXAMPLES 146.Sh EXAMPLES
112Default callback operation: 147Default 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
224first appeared in OpenSSL 0.9.6c and has been available since 259first 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
263first appeared in OpenSSL 1.1.0 and has been available since
264.Ox 7.1 .
226.Sh CAVEATS 265.Sh CAVEATS
227In general a verification callback should 266In general a verification callback should
228.Sy NOT 267.Sy NOT