1.\" $OpenBSD: X509_STORE_set_verify_cb_func.3,v 1.12 2022/11/16 14:51:08 schwarze Exp $ 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 4.\" 5.\" This file was written by Dr. Stephen Henson <steve@openssl.org>. 6.\" Copyright (c) 2009 The OpenSSL Project. All rights reserved. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 12.\" 1. Redistributions of source code must retain the above copyright 13.\" notice, this list of conditions and the following disclaimer. 14.\" 15.\" 2. Redistributions in binary form must reproduce the above copyright 16.\" notice, this list of conditions and the following disclaimer in 17.\" the documentation and/or other materials provided with the 18.\" distribution. 19.\" 20.\" 3. All advertising materials mentioning features or use of this 21.\" software must display the following acknowledgment: 22.\" "This product includes software developed by the OpenSSL Project 23.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 24.\" 25.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 26.\" endorse or promote products derived from this software without 27.\" prior written permission. For written permission, please contact 28.\" openssl-core@openssl.org. 29.\" 30.\" 5. Products derived from this software may not be called "OpenSSL" 31.\" nor may "OpenSSL" appear in their names without prior written 32.\" permission of the OpenSSL Project. 33.\" 34.\" 6. Redistributions of any form whatsoever must retain the following 35.\" acknowledgment: 36.\" "This product includes software developed by the OpenSSL Project 37.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" 38.\" 39.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 40.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 41.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 42.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 43.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 44.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 45.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 46.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 47.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 48.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 49.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 50.\" OF THE POSSIBILITY OF SUCH DAMAGE. 51.\" 52.Dd $Mdocdate: November 16 2022 $ 53.Dt X509_STORE_SET_VERIFY_CB_FUNC 3 54.Os 55.Sh NAME 56.Nm X509_STORE_set_verify_cb , 57.Nm X509_STORE_set_verify_cb_func , 58.Nm X509_STORE_get_verify_cb 59.Nd set verification callback 60.Sh SYNOPSIS 61.In openssl/x509_vfy.h 62.Ft void 63.Fo X509_STORE_set_verify_cb 64.Fa "X509_STORE *st" 65.Fa "X509_STORE_CTX_verify_cb verify_cb" 66.Fc 67.Ft void 68.Fo X509_STORE_set_verify_cb_func 69.Fa "X509_STORE *st" 70.Fa "X509_STORE_CTX_verify_cb verify_cb" 71.Fc 72.Ft X509_STORE_CTX_verify_cb 73.Fo X509_STORE_get_verify_cb 74.Fa "X509_STORE *st" 75.Fc 76.Sh DESCRIPTION 77.Fn X509_STORE_set_verify_cb 78sets the verification callback of 79.Sy ctx 80to 81.Sy verify_cb , 82overwriting any existing callback. 83.Pp 84.Fn X509_STORE_set_verify_cb_func 85also sets the verification callback but it is implemented as a macro. 86.Pp 87The verification callback from an 88.Vt X509_STORE 89is inherited by the corresponding 90.Vt X509_STORE_CTX 91structure when it is initialized. 92This can be used to set the verification callback when the 93.Vt X509_STORE_CTX 94is otherwise inaccessible (for example during S/MIME verification). 95.Sh RETURN VALUES 96.Fn X509_STORE_get_verify_cb 97returns the function pointer set with 98.Fn X509_STORE_set_verify_cb , 99or 100.Dv NULL 101if that function was not called on 102.Fa st . 103.Sh SEE ALSO 104.Xr X509_STORE_CTX_new 3 , 105.Xr X509_STORE_CTX_set_verify 3 , 106.Xr X509_STORE_CTX_set_verify_cb 3 , 107.Xr X509_STORE_new 3 , 108.Xr X509_STORE_set_flags 3 , 109.Xr X509_verify_cert 3 110.Sh HISTORY 111.Fn X509_STORE_set_verify_cb_func 112first appeared in SSLeay 0.8.0 and has been available since 113.Ox 2.4 . 114.Pp 115.Fn X509_STORE_set_verify_cb 116first appeared in OpenSSL 1.0.0 and has been available since 117.Ox 4.9 . 118.Pp 119.Fn X509_STORE_get_verify_cb 120first appeared in OpenSSL 1.1.0 and has been available since 121.Ox 7.2 . 122