SSL_SESSION_get0_cipher.pod 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. =pod
  2. =head1 NAME
  3. SSL_SESSION_get0_cipher,
  4. SSL_SESSION_set_cipher
  5. - set and retrieve the SSL cipher associated with a session
  6. =head1 SYNOPSIS
  7. #include <openssl/ssl.h>
  8. const SSL_CIPHER *SSL_SESSION_get0_cipher(const SSL_SESSION *s);
  9. int SSL_SESSION_set_cipher(SSL_SESSION *s, const SSL_CIPHER *cipher);
  10. =head1 DESCRIPTION
  11. SSL_SESSION_get0_cipher() retrieves the cipher that was used by the
  12. connection when the session was created, or NULL if it cannot be determined.
  13. The value returned is a pointer to an object maintained within B<s> and
  14. should not be released.
  15. SSL_SESSION_set_cipher() can be used to set the ciphersuite associated with the
  16. SSL_SESSION B<s> to B<cipher>. For example, this could be used to set up a
  17. session based PSK (see L<SSL_CTX_set_psk_use_session_callback(3)>).
  18. =head1 RETURN VALUES
  19. SSL_SESSION_get0_cipher() returns the SSL_CIPHER associated with the SSL_SESSION
  20. or NULL if it cannot be determined.
  21. SSL_SESSION_set_cipher() returns 1 on success or 0 on failure.
  22. =head1 SEE ALSO
  23. L<ssl(7)>,
  24. L<d2i_SSL_SESSION(3)>,
  25. L<SSL_SESSION_get_time(3)>,
  26. L<SSL_SESSION_get0_hostname(3)>,
  27. L<SSL_SESSION_free(3)>,
  28. L<SSL_CTX_set_psk_use_session_callback(3)>
  29. =head1 HISTORY
  30. The SSL_SESSION_get0_cipher() function was added in OpenSSL 1.1.0.
  31. The SSL_SESSION_set_cipher() function was added in OpenSSL 1.1.1.
  32. =head1 COPYRIGHT
  33. Copyright 2016-2017 The OpenSSL Project Authors. All Rights Reserved.
  34. Licensed under the Apache License 2.0 (the "License"). You may not use
  35. this file except in compliance with the License. You can obtain a copy
  36. in the file LICENSE in the source distribution or at
  37. L<https://www.openssl.org/source/license.html>.
  38. =cut