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

# libressl-SSL\_CTX\_get\_ex\_new\_index(3)

internal application specific data functions

## NAME

**SSL\_CTX\_get\_ex\_new\_index**, **SSL\_CTX\_set\_ex\_data**, **SSL\_CTX\_get\_ex\_data** – internal application specific data functions

## SYNOPSIS

SSL Library (libssl, -lssl) libcrypto

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

*int*\

**SSL\_CTX\_get\_ex\_new\_index**(*long argl*, *void \*argp*, *CRYPTO\_EX\_new \*new\_func*, *CRYPTO\_EX\_dup \*dup\_func*, *CRYPTO\_EX\_free \*free\_func*);

*int*\

**SSL\_CTX\_set\_ex\_data**(*SSL\_CTX \*ctx*, *int idx*, *void \*arg*);

*void* *\**\

**SSL\_CTX\_get\_ex\_data**(*const SSL\_CTX \*ctx*, *int idx*);

```
 typedef int new_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
                int idx, long argl, void *argp);
 typedef void free_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad,
                int idx, long argl, void *argp);
 typedef int dup_func(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d,
                int idx, long argl, void *argp);
```

## DESCRIPTION

Several OpenSSL structures can have application specific data attached to them. These functions are used internally by OpenSSL to manipulate application specific data attached to a specific structure.

**SSL\_CTX\_get\_ex\_new\_index**() is used to register a new index for application specific data.

**SSL\_CTX\_set\_ex\_data**() is used to store application data at *arg* for *idx* into the *ctx* object.

**SSL\_CTX\_get\_ex\_data**() is used to retrieve the information for *idx* from *ctx*.

A detailed description for the **\*\_get\_ex\_new\_index**() functionality can be found in RSA\_get\_ex\_new\_index(3). The **\*\_get\_ex\_data**() and **\*\_set\_ex\_data**() functionality is described in CRYPTO\_set\_ex\_data(3).

## SEE ALSO

CRYPTO\_set\_ex\_data(3), RSA\_get\_ex\_new\_index(3), [ssl(3)](/ssl/3.md)

## HISTORY

**SSL\_CTX\_get\_ex\_new\_index**(), **SSL\_CTX\_set\_ex\_data**(), and **SSL\_CTX\_get\_ex\_data**() first appeared in SSLeay 0.9.0 and have been available since OpenBSD 2.4.
