SSL_SESSION_get_time.pod 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. =pod
  2. =head1 NAME
  3. SSL_SESSION_get_time, SSL_SESSION_set_time, SSL_SESSION_get_timeout, SSL_SESSION_set_timeout - retrieve and manipulate session time and timeout settings
  4. =head1 SYNOPSIS
  5. #include <openssl/ssl.h>
  6. long SSL_SESSION_get_time(const SSL_SESSION *s);
  7. long SSL_SESSION_set_time(SSL_SESSION *s, long tm);
  8. long SSL_SESSION_get_timeout(const SSL_SESSION *s);
  9. long SSL_SESSION_set_timeout(SSL_SESSION *s, long tm);
  10. long SSL_get_time(const SSL_SESSION *s);
  11. long SSL_set_time(SSL_SESSION *s, long tm);
  12. long SSL_get_timeout(const SSL_SESSION *s);
  13. long SSL_set_timeout(SSL_SESSION *s, long tm);
  14. =head1 DESCRIPTION
  15. SSL_SESSION_get_time() returns the time at which the session B<s> was
  16. established. The time is given in seconds since the Epoch and therefore
  17. compatible to the time delivered by the time() call.
  18. SSL_SESSION_set_time() replaces the creation time of the session B<s> with
  19. the chosen value B<tm>.
  20. SSL_SESSION_get_timeout() returns the timeout value set for session B<s>
  21. in seconds.
  22. SSL_SESSION_set_timeout() sets the timeout value for session B<s> in seconds
  23. to B<tm>.
  24. The SSL_get_time(), SSL_set_time(), SSL_get_timeout(), and SSL_set_timeout()
  25. functions are synonyms for the SSL_SESSION_*() counterparts.
  26. =head1 NOTES
  27. Sessions are expired by examining the creation time and the timeout value.
  28. Both are set at creation time of the session to the actual time and the
  29. default timeout value at creation, respectively, as set by
  30. L<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>.
  31. Using these functions it is possible to extend or shorten the lifetime
  32. of the session.
  33. =head1 RETURN VALUES
  34. SSL_SESSION_get_time() and SSL_SESSION_get_timeout() return the currently
  35. valid values.
  36. SSL_SESSION_set_time() and SSL_SESSION_set_timeout() return 1 on success.
  37. If any of the function is passed the NULL pointer for the session B<s>,
  38. 0 is returned.
  39. =head1 SEE ALSO
  40. L<ssl(3)|ssl(3)>,
  41. L<SSL_CTX_set_timeout(3)|SSL_CTX_set_timeout(3)>,
  42. L<SSL_get_default_timeout(3)|SSL_get_default_timeout(3)>
  43. =cut