[#CRYPTO_set_ex_data]
= CRYPTO&lowbar;set&lowbar;ex&lowbar;data
:mrdocs:

Store `val` at ex&lowbar;data index `idx,` replacing any previous pointer&period;

== Synopsis

Declared in `&lt;openssl&sol;crypto&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
CRYPTO&lowbar;set&lowbar;ex&lowbar;data(
    xref:CRYPTO_EX_DATA.adoc[CRYPTO&lowbar;EX&lowbar;DATA]* ad,
    int idx,
    void* val);
----

== Return Value

1 on success, or 0 on failure&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *ad*
| Ex&hyphen;data bag to update&period;
| *idx*
| Index from CRYPTO&lowbar;get&lowbar;ex&lowbar;new&lowbar;index() (or a class helper)&period;
| *val*
| Pointer to store (may be NULL to clear the slot)&period;
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
