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