SSL_SESSION_get_time.pod 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. =pod
  2. =head1 NAME
  3. SSL_SESSION_get_time, SSL_SESSION_set_time, SSL_SESSION_get_timeout,
  4. SSL_SESSION_set_timeout,
  5. SSL_get_time, SSL_set_time, SSL_get_timeout, SSL_set_timeout
  6. - retrieve and manipulate session time and timeout settings
  7. =head1 SYNOPSIS
  8. #include <openssl/ssl.h>
  9. long SSL_SESSION_get_time(const SSL_SESSION *s);
  10. long SSL_SESSION_set_time(SSL_SESSION *s, long tm);
  11. long SSL_SESSION_get_timeout(const SSL_SESSION *s);
  12. long SSL_SESSION_set_timeout(SSL_SESSION *s, long tm);
  13. long SSL_get_time(const SSL_SESSION *s);
  14. long SSL_set_time(SSL_SESSION *s, long tm);
  15. long SSL_get_timeout(const SSL_SESSION *s);
  16. long SSL_set_timeout(SSL_SESSION *s, long tm);
  17. =head1 DESCRIPTION
  18. SSL_SESSION_get_time() returns the time at which the session B<s> was
  19. established. The time is given in seconds since the Epoch and therefore
  20. compatible to the time delivered by the time() call.
  21. SSL_SESSION_set_time() replaces the creation time of the session B<s> with
  22. the chosen value B<tm>.
  23. SSL_SESSION_get_timeout() returns the timeout value set for session B<s>
  24. in seconds.
  25. SSL_SESSION_set_timeout() sets the timeout value for session B<s> in seconds
  26. to B<tm>.
  27. The SSL_get_time(), SSL_set_time(), SSL_get_timeout(), and SSL_set_timeout()
  28. functions are synonyms for the SSL_SESSION_*() counterparts.
  29. =head1 NOTES
  30. Sessions are expired by examining the creation time and the timeout value.
  31. Both are set at creation time of the session to the actual time and the
  32. default timeout value at creation, respectively, as set by
  33. L<SSL_CTX_set_timeout(3)>.
  34. Using these functions it is possible to extend or shorten the lifetime
  35. of the session.
  36. =head1 RETURN VALUES
  37. SSL_SESSION_get_time() and SSL_SESSION_get_timeout() return the currently
  38. valid values.
  39. SSL_SESSION_set_time() and SSL_SESSION_set_timeout() return 1 on success.
  40. If any of the function is passed the NULL pointer for the session B<s>,
  41. 0 is returned.
  42. =head1 SEE ALSO
  43. L<ssl(7)>,
  44. L<SSL_CTX_set_timeout(3)>,
  45. L<SSL_get_default_timeout(3)>
  46. =head1 COPYRIGHT
  47. Copyright 2001-2016 The OpenSSL Project Authors. All Rights Reserved.
  48. Licensed under the Apache License 2.0 (the "License"). You may not use
  49. this file except in compliance with the License. You can obtain a copy
  50. in the file LICENSE in the source distribution or at
  51. L<https://www.openssl.org/source/license.html>.
  52. =cut