xref: /freebsd/crypto/openssl/doc/man3/d2i_SSL_SESSION.pod (revision b077aed33b7b6aefca7b17ddb250cf521f938613)
1e71b7053SJung-uk Kim=pod
2e71b7053SJung-uk Kim
3e71b7053SJung-uk Kim=head1 NAME
4e71b7053SJung-uk Kim
5e71b7053SJung-uk Kimd2i_SSL_SESSION, i2d_SSL_SESSION - convert SSL_SESSION object from/to ASN1 representation
6e71b7053SJung-uk Kim
7e71b7053SJung-uk Kim=head1 SYNOPSIS
8e71b7053SJung-uk Kim
9e71b7053SJung-uk Kim #include <openssl/ssl.h>
10e71b7053SJung-uk Kim
11e71b7053SJung-uk Kim SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
12e71b7053SJung-uk Kim                              long length);
13e71b7053SJung-uk Kim int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp);
14e71b7053SJung-uk Kim
15e71b7053SJung-uk Kim=head1 DESCRIPTION
16e71b7053SJung-uk Kim
17e71b7053SJung-uk KimThese functions decode and encode an SSL_SESSION object.
18e71b7053SJung-uk KimFor encoding details see L<d2i_X509(3)>.
19e71b7053SJung-uk Kim
20e71b7053SJung-uk KimSSL_SESSION objects keep internal link information about the session cache
21e71b7053SJung-uk Kimlist, when being inserted into one SSL_CTX object's session cache.
22e71b7053SJung-uk KimOne SSL_SESSION object, regardless of its reference count, must therefore
23e71b7053SJung-uk Kimonly be used with one SSL_CTX object (and the SSL objects created
24e71b7053SJung-uk Kimfrom this SSL_CTX object).
25e71b7053SJung-uk Kim
26e71b7053SJung-uk Kim=head1 RETURN VALUES
27e71b7053SJung-uk Kim
28e71b7053SJung-uk Kimd2i_SSL_SESSION() returns a pointer to the newly allocated SSL_SESSION
29e71b7053SJung-uk Kimobject. In case of failure the NULL-pointer is returned and the error message
30e71b7053SJung-uk Kimcan be retrieved from the error stack.
31e71b7053SJung-uk Kim
32e71b7053SJung-uk Kimi2d_SSL_SESSION() returns the size of the ASN1 representation in bytes.
33e71b7053SJung-uk KimWhen the session is not valid, B<0> is returned and no operation is performed.
34e71b7053SJung-uk Kim
35e71b7053SJung-uk Kim=head1 SEE ALSO
36e71b7053SJung-uk Kim
37e71b7053SJung-uk KimL<ssl(7)>, L<SSL_SESSION_free(3)>,
38e71b7053SJung-uk KimL<SSL_CTX_sess_set_get_cb(3)>,
39e71b7053SJung-uk KimL<d2i_X509(3)>
40e71b7053SJung-uk Kim
41e71b7053SJung-uk Kim=head1 COPYRIGHT
42e71b7053SJung-uk Kim
43e71b7053SJung-uk KimCopyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
44e71b7053SJung-uk Kim
45*b077aed3SPierre ProncheryLicensed under the Apache License 2.0 (the "License").  You may not use
46e71b7053SJung-uk Kimthis file except in compliance with the License.  You can obtain a copy
47e71b7053SJung-uk Kimin the file LICENSE in the source distribution or at
48e71b7053SJung-uk KimL<https://www.openssl.org/source/license.html>.
49e71b7053SJung-uk Kim
50e71b7053SJung-uk Kim=cut
51