---
name: "libressl-X509_STORE_set_verify_cb_func"
section: "3"
platform: "linux"
package: "libressl"
version: "4.4.0-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/libressl-X509_STORE_set_verify_cb_func"
---

# libressl-X509\_STORE\_set\_verify\_cb\_func(3)

set verification callback

## NAME

**X509\_STORE\_set\_verify\_cb**, **X509\_STORE\_set\_verify\_cb\_func**, **X509\_STORE\_get\_verify\_cb** – set verification callback

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

**#include \<openssl/x509\_vfy.h\>**

*void*\

**X509\_STORE\_set\_verify\_cb**(*X509\_STORE \*st*, *X509\_STORE\_CTX\_verify\_cb verify\_cb*);

*void*\

**X509\_STORE\_set\_verify\_cb\_func**(*X509\_STORE \*st*, *X509\_STORE\_CTX\_verify\_cb verify\_cb*);

*X509\_STORE\_CTX\_verify\_cb*\

**X509\_STORE\_get\_verify\_cb**(*X509\_STORE \*st*);

## DESCRIPTION

**X509\_STORE\_set\_verify\_cb**() sets the verification callback of **ctx** to **verify\_cb**, overwriting any existing callback.

**X509\_STORE\_set\_verify\_cb\_func**() also sets the verification callback but it is implemented as a macro.

The verification callback from an *X509\_STORE* is inherited by the corresponding *X509\_STORE\_CTX* structure when it is initialized. This can be used to set the verification callback when the *X509\_STORE\_CTX* is otherwise inaccessible (for example during S/MIME verification).

## RETURN VALUES

**X509\_STORE\_get\_verify\_cb**() returns the function pointer set with **X509\_STORE\_set\_verify\_cb**(), or NULL if that function was not called on *st*.

## SEE ALSO

X509\_STORE\_CTX\_new(3), X509\_STORE\_CTX\_set\_verify(3), X509\_STORE\_CTX\_set\_verify\_cb(3), X509\_STORE\_new(3), X509\_STORE\_set\_flags(3), X509\_verify\_cert(3)

## HISTORY

**X509\_STORE\_set\_verify\_cb\_func**() first appeared in SSLeay 0.8.0 and has been available since OpenBSD 2.4.

**X509\_STORE\_set\_verify\_cb**() first appeared in OpenSSL 1.0.0 and has been available since OpenBSD 4.9.

**X509\_STORE\_get\_verify\_cb**() first appeared in OpenSSL 1.1.0 and has been available since OpenBSD 7.2.
