5 d2i_SSL_SESSION, d2i_SSL_SESSION_ex, i2d_SSL_SESSION - convert SSL_SESSION object from/to ASN1 representation
9 #include <openssl/ssl.h>
11 SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
13 SSL_SESSION *d2i_SSL_SESSION_ex(SSL_SESSION **a, const unsigned char **pp,
14 long length, OSSL_LIB_CTX *libctx,
16 int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp);
20 These functions decode and encode an SSL_SESSION object.
21 For encoding details see L<d2i_X509(3)>.
23 SSL_SESSION objects keep internal link information about the session cache
24 list, when being inserted into one SSL_CTX object's session cache.
25 One SSL_SESSION object, regardless of its reference count, must therefore
26 only be used with one SSL_CTX object (and the SSL objects created
27 from this SSL_CTX object).
31 d2i_SSL_SESSION() and d2i_SSL_SESSION_ex() return a pointer to the newly
32 allocated SSL_SESSION object.
33 In case of failure the NULL-pointer is returned and the error message
34 can be retrieved from the error stack.
36 i2d_SSL_SESSION() returns the size of the ASN1 representation in bytes.
37 When the session is not valid, B<0> is returned and no operation is performed.
41 L<ssl(7)>, L<SSL_SESSION_free(3)>,
42 L<SSL_CTX_sess_set_get_cb(3)>,
47 Copyright 2001-2023 The OpenSSL Project Authors. All Rights Reserved.
49 Licensed under the Apache License 2.0 (the "License"). You may not use
50 this file except in compliance with the License. You can obtain a copy
51 in the file LICENSE in the source distribution or at
52 L<https://www.openssl.org/source/license.html>.