2
0

d2i_SSL_SESSION.pod 1.8 KB

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