1*89e35aa1Sschwarze.\" $OpenBSD: SSL_SESSION_get_ex_new_index.3,v 1.3 2018/03/21 08:06:34 schwarze Exp $ 2d50a83fdSschwarze.\" OpenSSL 9b86974e Aug 17 15:21:33 2015 -0400 3f1a3c524Sschwarze.\" 4d50a83fdSschwarze.\" This file was written by Lutz Jaenicke <jaenicke@openssl.org>. 5d50a83fdSschwarze.\" Copyright (c) 2001, 2005 The OpenSSL Project. All rights reserved. 6f1a3c524Sschwarze.\" 7d50a83fdSschwarze.\" Redistribution and use in source and binary forms, with or without 8d50a83fdSschwarze.\" modification, are permitted provided that the following conditions 9d50a83fdSschwarze.\" are met: 10d50a83fdSschwarze.\" 11d50a83fdSschwarze.\" 1. Redistributions of source code must retain the above copyright 12d50a83fdSschwarze.\" notice, this list of conditions and the following disclaimer. 13d50a83fdSschwarze.\" 14d50a83fdSschwarze.\" 2. Redistributions in binary form must reproduce the above copyright 15d50a83fdSschwarze.\" notice, this list of conditions and the following disclaimer in 16d50a83fdSschwarze.\" the documentation and/or other materials provided with the 17d50a83fdSschwarze.\" distribution. 18d50a83fdSschwarze.\" 19d50a83fdSschwarze.\" 3. All advertising materials mentioning features or use of this 20d50a83fdSschwarze.\" software must display the following acknowledgment: 21d50a83fdSschwarze.\" "This product includes software developed by the OpenSSL Project 22d50a83fdSschwarze.\" for use in the OpenSSL Toolkit. (http://www.openssl.org/)" 23d50a83fdSschwarze.\" 24d50a83fdSschwarze.\" 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to 25d50a83fdSschwarze.\" endorse or promote products derived from this software without 26d50a83fdSschwarze.\" prior written permission. For written permission, please contact 27d50a83fdSschwarze.\" openssl-core@openssl.org. 28d50a83fdSschwarze.\" 29d50a83fdSschwarze.\" 5. Products derived from this software may not be called "OpenSSL" 30d50a83fdSschwarze.\" nor may "OpenSSL" appear in their names without prior written 31d50a83fdSschwarze.\" permission of the OpenSSL Project. 32d50a83fdSschwarze.\" 33d50a83fdSschwarze.\" 6. Redistributions of any form whatsoever must retain the following 34d50a83fdSschwarze.\" acknowledgment: 35d50a83fdSschwarze.\" "This product includes software developed by the OpenSSL Project 36d50a83fdSschwarze.\" for use in the OpenSSL Toolkit (http://www.openssl.org/)" 37d50a83fdSschwarze.\" 38d50a83fdSschwarze.\" THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY 39d50a83fdSschwarze.\" EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 40d50a83fdSschwarze.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 41d50a83fdSschwarze.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR 42d50a83fdSschwarze.\" ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 43d50a83fdSschwarze.\" SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 44d50a83fdSschwarze.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 45d50a83fdSschwarze.\" LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 46d50a83fdSschwarze.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 47d50a83fdSschwarze.\" STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 48d50a83fdSschwarze.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED 49d50a83fdSschwarze.\" OF THE POSSIBILITY OF SUCH DAMAGE. 50d50a83fdSschwarze.\" 51*89e35aa1Sschwarze.Dd $Mdocdate: March 21 2018 $ 52f1a3c524Sschwarze.Dt SSL_SESSION_GET_EX_NEW_INDEX 3 53f1a3c524Sschwarze.Os 54f1a3c524Sschwarze.Sh NAME 55f1a3c524Sschwarze.Nm SSL_SESSION_get_ex_new_index , 56f1a3c524Sschwarze.Nm SSL_SESSION_set_ex_data , 57f1a3c524Sschwarze.Nm SSL_SESSION_get_ex_data 58f1a3c524Sschwarze.Nd internal application specific data functions 59f1a3c524Sschwarze.Sh SYNOPSIS 60f1a3c524Sschwarze.In openssl/ssl.h 61f1a3c524Sschwarze.Ft int 62f1a3c524Sschwarze.Fo SSL_SESSION_get_ex_new_index 63f1a3c524Sschwarze.Fa "long argl" 64f1a3c524Sschwarze.Fa "void *argp" 65f1a3c524Sschwarze.Fa "CRYPTO_EX_new *new_func" 66f1a3c524Sschwarze.Fa "CRYPTO_EX_dup *dup_func" 67f1a3c524Sschwarze.Fa "CRYPTO_EX_free *free_func" 68f1a3c524Sschwarze.Fc 69f1a3c524Sschwarze.Ft int 70f1a3c524Sschwarze.Fn SSL_SESSION_set_ex_data "SSL_SESSION *session" "int idx" "void *arg" 71f1a3c524Sschwarze.Ft void * 72f1a3c524Sschwarze.Fn SSL_SESSION_get_ex_data "const SSL_SESSION *session" "int idx" 73f1a3c524Sschwarze.Bd -literal 74f1a3c524Sschwarze typedef int new_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad, 75f1a3c524Sschwarze int idx, long argl, void *argp); 76f1a3c524Sschwarze typedef void free_func(void *parent, void *ptr, CRYPTO_EX_DATA *ad, 77f1a3c524Sschwarze int idx, long argl, void *argp); 78f1a3c524Sschwarze typedef int dup_func(CRYPTO_EX_DATA *to, CRYPTO_EX_DATA *from, void *from_d, 79f1a3c524Sschwarze int idx, long argl, void *argp); 80f1a3c524Sschwarze.Ed 81f1a3c524Sschwarze.Sh DESCRIPTION 82f1a3c524SschwarzeSeveral OpenSSL structures can have application specific data attached to them. 83f1a3c524SschwarzeThese functions are used internally by OpenSSL to manipulate 84f1a3c524Sschwarzeapplication-specific data attached to a specific structure. 85f1a3c524Sschwarze.Pp 86f1a3c524Sschwarze.Fn SSL_SESSION_get_ex_new_index 87f1a3c524Sschwarzeis used to register a new index for application-specific data. 88f1a3c524Sschwarze.Pp 89f1a3c524Sschwarze.Fn SSL_SESSION_set_ex_data 90f1a3c524Sschwarzeis used to store application data at 91f1a3c524Sschwarze.Fa arg 92f1a3c524Sschwarzefor 93f1a3c524Sschwarze.Fa idx 94f1a3c524Sschwarzeinto the 95f1a3c524Sschwarze.Fa session 96f1a3c524Sschwarzeobject. 97f1a3c524Sschwarze.Pp 98f1a3c524Sschwarze.Fn SSL_SESSION_get_ex_data 99f1a3c524Sschwarzeis used to retrieve the information for 100f1a3c524Sschwarze.Fa idx 101f1a3c524Sschwarzefrom 102f1a3c524Sschwarze.Fa session . 103f1a3c524Sschwarze.Pp 104f1a3c524SschwarzeA detailed description for the 105f1a3c524Sschwarze.Fn *_get_ex_new_index 106f1a3c524Sschwarzefunctionality 107f1a3c524Sschwarzecan be found in 108f1a3c524Sschwarze.Xr RSA_get_ex_new_index 3 . 109f1a3c524SschwarzeThe 110f1a3c524Sschwarze.Fn *_get_ex_data 111f1a3c524Sschwarzeand 112f1a3c524Sschwarze.Fn *_set_ex_data 113f1a3c524Sschwarzefunctionality is described in 114f1a3c524Sschwarze.Xr CRYPTO_set_ex_data 3 . 115f1a3c524Sschwarze.Sh WARNINGS 116f1a3c524SschwarzeThe application data is only maintained for sessions held in memory. 117f1a3c524SschwarzeThe application data is not included when dumping the session with 118f1a3c524Sschwarze.Xr i2d_SSL_SESSION 3 119f1a3c524Sschwarze(and all functions indirectly calling the dump functions like 120f1a3c524Sschwarze.Xr PEM_write_SSL_SESSION 3 121f1a3c524Sschwarzeand 122f1a3c524Sschwarze.Xr PEM_write_bio_SSL_SESSION 3 ) 123f1a3c524Sschwarzeand can therefore not be restored. 124f1a3c524Sschwarze.Sh SEE ALSO 125f1a3c524Sschwarze.Xr CRYPTO_set_ex_data 3 , 126f1a3c524Sschwarze.Xr RSA_get_ex_new_index 3 , 127f1a3c524Sschwarze.Xr ssl 3 128*89e35aa1Sschwarze.Sh HISTORY 129*89e35aa1Sschwarze.Fn SSL_SESSION_get_ex_new_index , 130*89e35aa1Sschwarze.Fn SSL_SESSION_set_ex_data , 131*89e35aa1Sschwarzeand 132*89e35aa1Sschwarze.Fn SSL_SESSION_get_ex_data 133*89e35aa1Sschwarzefirst appeared in SSLeay 0.9.0 and have been available since 134*89e35aa1Sschwarze.Ox 2.4 . 135