---
name: "libressl-SSL_get_verify_result"
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-SSL_get_verify_result"
---

# libressl-SSL\_get\_verify\_result(3)

get result of peer certificate verification

## NAME

**SSL\_get\_verify\_result** – get result of peer certificate verification

## SYNOPSIS

SSL Library (libssl, -lssl) libcrypto

**#include \<openssl/ssl.h\>**

*long*\

**SSL\_get\_verify\_result**(*const SSL \*ssl*);

## DESCRIPTION

**SSL\_get\_verify\_result**() returns the result of the verification of the X509 certificate presented by the peer, if any.

**SSL\_get\_verify\_result**() can only return one error code while the verification of a certificate can fail because of many reasons at the same time. Only the last verification error that occurred during the processing is available from **SSL\_get\_verify\_result**().

The verification result is part of the established session and is restored when a session is reused.

## RETURN VALUES

The following return values can currently occur:

- X509\_V\_OK

  The verification succeeded or no peer certificate was presented.

- Any other value

  Documented in [openssl(1)](/openssl/1.md).

## SEE ALSO

[openssl(1)](/openssl/1.md), [ssl(3)](/ssl/3.md), SSL\_CTX\_set\_verify(3), SSL\_get0\_peername(3), SSL\_get\_peer\_certificate(3), SSL\_set\_verify\_result(3)

## HISTORY

**SSL\_get\_verify\_result**() first appeared in SSLeay 0.6.1 and has been available since OpenBSD 2.4.

## BUGS

If no peer certificate was presented, the returned result code is X509\_V\_OK. This is because no verification error occurred; however, it does not indicate success. **SSL\_get\_verify\_result**() is only useful in connection with SSL\_get\_peer\_certificate(3).
