SSL_SESSION_get_protocol_version.pod 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. =pod
  2. =head1 NAME
  3. SSL_SESSION_get_protocol_version,
  4. SSL_SESSION_set_protocol_version
  5. - get and set the session protocol version
  6. =head1 SYNOPSIS
  7. #include <openssl/ssl.h>
  8. int SSL_SESSION_get_protocol_version(const SSL_SESSION *s);
  9. int SSL_SESSION_set_protocol_version(SSL_SESSION *s, int version);
  10. =head1 DESCRIPTION
  11. SSL_SESSION_get_protocol_version() returns the protocol version number used
  12. by session B<s>.
  13. SSL_SESSION_set_protocol_version() sets the protocol version associated with the
  14. SSL_SESSION object B<s> to the value B<version>. This value should be a version
  15. constant such as B<TLS1_3_VERSION> etc. For example, this could be used to set
  16. up a session based PSK (see L<SSL_CTX_set_psk_use_session_callback(3)>).
  17. =head1 RETURN VALUES
  18. SSL_SESSION_get_protocol_version() returns a number indicating the protocol
  19. version used for the session; this number matches the constants I<e.g.>
  20. B<TLS1_VERSION> or B<TLS1_2_VERSION>.
  21. Note that the SSL_SESSION_get_protocol_version() function
  22. does B<not> perform a null check on the provided session B<s> pointer.
  23. SSL_SESSION_set_protocol_version() returns 1 on success or 0 on failure.
  24. =head1 SEE ALSO
  25. L<ssl(7)>,
  26. L<SSL_CTX_set_psk_use_session_callback(3)>
  27. =head1 HISTORY
  28. SSL_SESSION_get_protocol_version() was first added to OpenSSL 1.1.0.
  29. SSL_SESSION_set_protocol_version() was first added to OpenSSL 1.1.1.
  30. =head1 COPYRIGHT
  31. Copyright 2001-2017 The OpenSSL Project Authors. All Rights Reserved.
  32. Licensed under the OpenSSL license (the "License"). You may not use
  33. this file except in compliance with the License. You can obtain a copy
  34. in the file LICENSE in the source distribution or at
  35. L<https://www.openssl.org/source/license.html>.
  36. =cut