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

# libressl-BIO\_get\_ex\_new\_index(3)

application-specific data

## NAME

**BIO\_get\_ex\_new\_index**, **BIO\_set\_ex\_data**, **BIO\_get\_ex\_data**, **BIO\_set\_app\_data**, **BIO\_get\_app\_data**, **UI\_get\_ex\_new\_index**, **UI\_set\_ex\_data**, **UI\_get\_ex\_data**, **X509\_get\_ex\_new\_index**, **X509\_set\_ex\_data**, **X509\_get\_ex\_data**, **EC\_KEY\_get\_ex\_new\_index**, **EC\_KEY\_get\_ex\_data**, **EC\_KEY\_set\_ex\_data** – application-specific data

## SYNOPSIS

Crypto Library (libcrypto, -lcrypto)

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

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

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

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

*int*\

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

*int*\

**TYPE\_set\_ex\_data**(*TYPE \*d*, *int idx*, *void \*arg*);

*void* *\**\

**TYPE\_get\_ex\_data**(*TYPE \*d*, *int idx*);

*int*\

**TYPE\_set\_app\_data**(*TYPE \*d*, *void \*arg*);

*void* *\**\

**TYPE\_get\_app\_data**(*TYPE \*d*);

## DESCRIPTION

In the description here, *TYPE* is used a placeholder for any of the OpenSSL datatypes listed in CRYPTO\_get\_ex\_new\_index(3).

These functions handle application-specific data in OpenSSL data structures. Their usage is identical to that of RSA\_get\_ex\_new\_index(3), RSA\_set\_ex\_data(3), and RSA\_get\_ex\_data(3).

**TYPE\_get\_ex\_new\_index**() is a macro that calls CRYPTO\_get\_ex\_new\_index(3) with the correct index value.

**TYPE\_set\_ex\_data**() is a function that calls CRYPTO\_set\_ex\_data(3) with an offset into the opaque ex\_data part of the *TYPE* object.

**TYPE\_get\_ex\_data**() is a function that calls CRYPTO\_get\_ex\_data(3) with an offset into the opaque ex\_data part of the *TYPE* object.

**TYPE\_set\_app\_data**() and **TYPE\_get\_app\_data**() are deprecated wrapper macros that call **TYPE\_set\_ex\_data**() and **TYPE\_get\_ex\_data**() with *idx* set to 0.

## RETURN VALUES

**TYPE\_get\_new\_ex\_index**() returns a new index on success or -1 on error.

**TYPE\_set\_ex\_data**() and **TYPE\_set\_app\_data**() return 1 on success or 0 on error.

**TYPE\_get\_ex\_data**() and **TYPE\_get\_app\_data**() return the application data or NULL if an error occurred.

## SEE ALSO

BIO\_new(3), CRYPTO\_get\_ex\_new\_index(3), RSA\_get\_ex\_new\_index(3), X509\_new(3)

## HISTORY

**BIO\_set\_app\_data**() and **BIO\_get\_app\_data**() first appeared in SSLeay 0.8.1. **BIO\_get\_ex\_new\_index**(), **BIO\_set\_ex\_data**(), and **BIO\_get\_ex\_data**() first appeared in SSLeay 0.9.0. These functions have been available since OpenBSD 2.4.

**X509\_get\_ex\_new\_index**(), **X509\_set\_ex\_data**(), and **X509\_get\_ex\_data**() first appeared in OpenSSL 0.9.5 and have been available since OpenBSD 2.7.

**UI\_get\_ex\_new\_index**(), **UI\_set\_ex\_data**(), and **UI\_get\_ex\_data**() first appeared in OpenSSL 0.9.7 and have been available since OpenBSD 3.2.

**EC\_KEY\_get\_ex\_new\_index**(), **EC\_KEY\_set\_ex\_data**(), and **EC\_KEY\_get\_ex\_data**() first appeared in OpenSSL 1.1.0 and have been available since OpenBSD 6.5.
