]> git.ipfire.org Git - thirdparty/openssl.git/blame - doc/man3/d2i_SSL_SESSION.pod
RFC7250 (RPK) support
[thirdparty/openssl.git] / doc / man3 / d2i_SSL_SESSION.pod
CommitLineData
8cbceba6
LJ
1=pod
2
3=head1 NAME
54ff1e6a 4
3c95ef22 5d2i_SSL_SESSION, d2i_SSL_SESSION_ex, i2d_SSL_SESSION - convert SSL_SESSION object from/to ASN1 representation
8cbceba6
LJ
6
7=head1 SYNOPSIS
8
9 #include <openssl/ssl.h>
10
e9b77246
BB
11 SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
12 long length);
3c95ef22
TS
13 SSL_SESSION *d2i_SSL_SESSION_ex(SSL_SESSION **a, const unsigned char **pp,
14 long length, OSSL_LIB_CTX *libctx,
15 const char *propq);
9022f240 16 int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp);
8cbceba6
LJ
17
18=head1 DESCRIPTION
19
4692340e
RS
20These functions decode and encode an SSL_SESSION object.
21For encoding details see L<d2i_X509(3)>.
56fa8e69
LJ
22
23SSL_SESSION objects keep internal link information about the session cache
24list, when being inserted into one SSL_CTX object's session cache.
25One SSL_SESSION object, regardless of its reference count, must therefore
26only be used with one SSL_CTX object (and the SSL objects created
27from this SSL_CTX object).
8cbceba6 28
8cbceba6
LJ
29=head1 RETURN VALUES
30
3c95ef22
TS
31d2i_SSL_SESSION() and d2i_SSL_SESSION_ex() return a pointer to the newly
32allocated SSL_SESSION object.
33In case of failure the NULL-pointer is returned and the error message
8cbceba6
LJ
34can be retrieved from the error stack.
35
36i2d_SSL_SESSION() returns the size of the ASN1 representation in bytes.
37When the session is not valid, B<0> is returned and no operation is performed.
38
39=head1 SEE ALSO
40
b97fdb57 41L<ssl(7)>, L<SSL_SESSION_free(3)>,
4692340e
RS
42L<SSL_CTX_sess_set_get_cb(3)>,
43L<d2i_X509(3)>
8cbceba6 44
e2f92610
RS
45=head1 COPYRIGHT
46
3c95ef22 47Copyright 2001-2023 The OpenSSL Project Authors. All Rights Reserved.
e2f92610 48
4746f25a 49Licensed under the Apache License 2.0 (the "License"). You may not use
e2f92610
RS
50this file except in compliance with the License. You can obtain a copy
51in the file LICENSE in the source distribution or at
52L<https://www.openssl.org/source/license.html>.
53
54=cut