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

# libressl-SSL\_set1\_param(3)

get and set verification parameters

## NAME

**SSL\_CTX\_get0\_param**, **SSL\_get0\_param**, **SSL\_CTX\_set1\_param**, **SSL\_set1\_param** – get and set verification parameters

## SYNOPSIS

SSL Library (libssl, -lssl) libcrypto

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

*X509\_VERIFY\_PARAM* *\**\

**SSL\_CTX\_get0\_param**(*SSL\_CTX \*ctx*);

*X509\_VERIFY\_PARAM* *\**\

**SSL\_get0\_param**(*SSL \*ssl*);

*int*\

**SSL\_CTX\_set1\_param**(*SSL\_CTX \*ctx*, *X509\_VERIFY\_PARAM \*vpm*);

*int*\

**SSL\_set1\_param**(*SSL \*ssl*, *X509\_VERIFY\_PARAM \*vpm*);

## DESCRIPTION

**SSL\_CTX\_get0\_param**() and **SSL\_get0\_param**() retrieve an internal pointer to the verification parameters for *ctx* or *ssl*, respectively. The returned pointer must not be freed by the calling application, but the application can modify the parameters pointed to, to suit its needs: for example to add a hostname check.

**SSL\_CTX\_set1\_param**() and **SSL\_set1\_param**() set the verification parameters to *vpm* for *ctx* or *ssl*.

## RETURN VALUES

**SSL\_CTX\_get0\_param**() and **SSL\_get0\_param**() return a pointer to an *X509\_VERIFY\_PARAM* structure.

**SSL\_CTX\_set1\_param**() and **SSL\_set1\_param**() return 1 for success or 0 for failure.

## EXAMPLES

Check that the hostname matches *www.foo.com* in the peer certificate:

```
X509_VERIFY_PARAM *vpm = SSL_get0_param(ssl);
X509_VERIFY_PARAM_set1_host(vpm, "www.foo.com", 0);
```

## SEE ALSO

[ssl(3)](/ssl/3.md), X509\_VERIFY\_PARAM\_set\_flags(3)

## HISTORY

**SSL\_CTX\_set1\_param**() and **SSL\_set1\_param**() first appeared in OpenSSL 1.0.0 and have been available since OpenBSD 4.9.

**SSL\_CTX\_get0\_param**() and **SSL\_get0\_param**() first appeared in OpenSSL 1.0.2 and have been available since OpenBSD 6.3.
