d2i_SSL_SESSION.pod 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. =pod
  2. =head1 NAME
  3. d2i_SSL_SESSION, i2d_SSL_SESSION - convert SSL_SESSION object from/to ASN1 representation
  4. =head1 SYNOPSIS
  5. #include <openssl/ssl.h>
  6. SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a, const unsigned char **pp,
  7. long length);
  8. int i2d_SSL_SESSION(SSL_SESSION *in, unsigned char **pp);
  9. =head1 DESCRIPTION
  10. These functions decode and encode an SSL_SESSION object.
  11. For encoding details see L<d2i_X509(3)>.
  12. SSL_SESSION objects keep internal link information about the session cache
  13. list, when being inserted into one SSL_CTX object's session cache.
  14. One SSL_SESSION object, regardless of its reference count, must therefore
  15. only be used with one SSL_CTX object (and the SSL objects created
  16. from this SSL_CTX object).
  17. =head1 RETURN VALUES
  18. d2i_SSL_SESSION() returns a pointer to the newly allocated SSL_SESSION
  19. object. In case of failure the NULL-pointer is returned and the error message
  20. can be retrieved from the error stack.
  21. i2d_SSL_SESSION() returns the size of the ASN1 representation in bytes.
  22. When the session is not valid, B<0> is returned and no operation is performed.
  23. =head1 SEE ALSO
  24. L<ssl(7)>, L<SSL_SESSION_free(3)>,
  25. L<SSL_CTX_sess_set_get_cb(3)>,
  26. L<d2i_X509(3)>
  27. =head1 COPYRIGHT
  28. Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
  29. Licensed under the Apache License 2.0 (the "License"). You may not use
  30. this file except in compliance with the License. You can obtain a copy
  31. in the file LICENSE in the source distribution or at
  32. L<https://www.openssl.org/source/license.html>.
  33. =cut