Certificate Management Protocol (CMP, RFC 4210) extension to OpenSSL
[openssl.git] / doc / man3 / SSL_SESSION_get_ex_data.pod
1 =pod
2
3 =head1 NAME
4
5 SSL_SESSION_set_ex_data,
6 SSL_SESSION_get_ex_data
7 - get and set application specific data on a session
8
9 =head1 SYNOPSIS
10
11  #include <openssl/ssl.h>
12
13  int SSL_SESSION_set_ex_data(SSL_SESSION *ss, int idx, void *data);
14  void *SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx);
15
16 =head1 DESCRIPTION
17
18 SSL_SESSION_set_ex_data() enables an application to store arbitrary application
19 specific data B<data> in an SSL_SESSION structure B<ss>. The index B<idx> should
20 be a value previously returned from a call to L<CRYPTO_get_ex_new_index(3)>.
21
22 SSL_SESSION_get_ex_data() retrieves application specific data previously stored
23 in an SSL_SESSION structure B<s>. The B<idx> value should be the same as that
24 used when originally storing the data.
25
26 =head1 RETURN VALUES
27
28 SSL_SESSION_set_ex_data() returns 1 for success or 0 for failure.
29
30 SSL_SESSION_get_ex_data() returns the previously stored value or NULL on
31 failure. NULL may also be a valid value.
32
33 =head1 SEE ALSO
34
35 L<ssl(7)>,
36 L<CRYPTO_get_ex_new_index(3)>
37
38 =head1 COPYRIGHT
39
40 Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
41
42 Licensed under the Apache License 2.0 (the "License").  You may not use
43 this file except in compliance with the License.  You can obtain a copy
44 in the file LICENSE in the source distribution or at
45 L<https://www.openssl.org/source/license.html>.
46
47 =cut