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

# libressl-SSL\_CTX\_ctrl(3)

internal handling functions for SSL\_CTX and SSL objects

## NAME

**SSL\_CTX\_ctrl**, **SSL\_CTX\_callback\_ctrl**, **SSL\_ctrl**, **SSL\_callback\_ctrl** – internal handling functions for SSL\_CTX and SSL objects

## SYNOPSIS

SSL Library (libssl, -lssl) libcrypto

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

*long*\

**SSL\_CTX\_ctrl**(*SSL\_CTX \*ctx*, *int cmd*, *long larg*, *void \*parg*);

*long*\

**SSL\_CTX\_callback\_ctrl**(*SSL\_CTX \**, *int cmd*, *void (\*fp)()*);

*long*\

**SSL\_ctrl**(*SSL \*ssl*, *int cmd*, *long larg*, *void \*parg*);

*long*\

**SSL\_callback\_ctrl**(*SSL \**, *int cmd*, *void (\*fp)()*);

## DESCRIPTION

The **SSL\_\*\_ctrl**() family of functions is used to manipulate settings of the *SSL\_CTX* and *SSL* objects. Depending on the command *cmd* the arguments *larg*, *parg*, or *fp* are evaluated. These functions should never be called directly. All functionalities needed are made available via other functions or macros.

## RETURN VALUES

The return values of the **SSL\*\_ctrl**() functions depend on the command supplied via the **cmd**() parameter.

## SEE ALSO

[ssl(3)](/ssl/3.md), SSL\_CTX\_add\_extra\_chain\_cert(3), SSL\_CTX\_sess\_number(3), SSL\_CTX\_sess\_set\_cache\_size(3), SSL\_CTX\_set\_max\_cert\_list(3), SSL\_CTX\_set\_mode(3), SSL\_CTX\_set\_options(3), SSL\_CTX\_set\_session\_cache\_mode(3), SSL\_CTX\_set\_tlsext\_servername\_callback(3), SSL\_CTX\_set\_tlsext\_status\_cb(3), SSL\_CTX\_set\_tlsext\_ticket\_key\_cb(3), SSL\_get\_server\_tmp\_key(3), SSL\_num\_renegotiations(3), SSL\_session\_reused(3), SSL\_set\_max\_send\_fragment(3)

## HISTORY

**SSL\_CTX\_ctrl**() and **SSL\_ctrl**() first appeared in SSLeay 0.8.0 and have been available since OpenBSD 2.4.

**SSL\_CTX\_callback\_ctrl**() and **SSL\_callback\_ctrl**() first appeared in OpenSSL 0.9.5 and have been available since OpenBSD 2.7.
