Add documentation for SSL_*_ex_data() functions
[openssl.git] / doc / man3 / SSL_CTX_set_ex_data.pod
1 =pod
2
3 =head1 NAME
4
5 SSL_CTX_get_ex_data, SSL_CTX_set_ex_data,
6 SSL_get_ex_data, SSL_set_ex_data,
7 SSL_SESSION_get_ex_data, SSL_SESSION_set_ex_data
8 - Store and retrieve extra data from the SSL_CTX, SSL or SSL_SESSION
9
10 =head1 SYNOPSIS
11
12  #include <openssl/ssl.h>
13
14  void *SSL_CTX_get_ex_data(const SSL_CTX *s, int idx);
15
16  int SSL_CTX_set_ex_data(SSL_CTX *s, int idx, void *arg);
17
18  void *SSL_get_ex_data(const SSL *s, int idx);
19
20  int SSL_set_ex_data(SSL *s, int idx, void *arg);
21
22  int SSL_SESSION_set_ex_data(SSL_SESSION *s, int idx, void *arg);
23
24  void *SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx);
25
26 =head1 DESCRIPTION
27
28 SSL*_set_ex_data() functions can be used to store arbitrary user data into the
29 B<SSL_CTX>, B<SSL> or B<SSL_SESSION>. The user must supply a unique index
30 which they can subsequently use to retrieve the data using SSL*_get_ex_data().
31
32 For more detailed information see L<CRYPTO_get_ex_data(3)> and
33 L<CRYPTO_set_ex_data(3)> which implement these functions and
34 L<CRYPTO_get_ex_new_index(3)> for generating a unique index.
35
36 =head1 RETURN VALUES
37
38 The SSL*_set_ex_data() functions return 1 if the item is successfully stored
39 and 0 if it is not.
40 The SSL*_get_ex_data() functions return the ex_data pointer if successful,
41 otherwise NULL.
42
43 =head1 SEE ALSO
44
45 L<CRYPTO_get_ex_data(3)>, L<CRYPTO_set_ex_data(3)>,
46 L<CRYPTO_get_ex_new_index(3)>
47
48 =head1 COPYRIGHT
49
50 Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
51
52 Licensed under the OpenSSL license (the "License").  You may not use
53 this file except in compliance with the License.  You can obtain a copy
54 in the file LICENSE in the source distribution or at
55 L<https://www.openssl.org/source/license.html>.
56
57 =cut