SSL_get_current_cipher.pod 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. =pod
  2. =head1 NAME
  3. SSL_get_current_cipher, SSL_get_cipher_name, SSL_get_cipher,
  4. SSL_get_cipher_bits, SSL_get_cipher_version,
  5. SSL_get_pending_cipher - get SSL_CIPHER of a connection
  6. =head1 SYNOPSIS
  7. #include <openssl/ssl.h>
  8. SSL_CIPHER *SSL_get_current_cipher(const SSL *ssl);
  9. SSL_CIPHER *SSL_get_pending_cipher(const SSL *ssl);
  10. const char *SSL_get_cipher_name(const SSL *s);
  11. const char *SSL_get_cipher(const SSL *s);
  12. int SSL_get_cipher_bits(const SSL *s, int *np) \
  13. const char *SSL_get_cipher_version(const SSL *s);
  14. =head1 DESCRIPTION
  15. SSL_get_current_cipher() returns a pointer to an SSL_CIPHER object containing
  16. the description of the actually used cipher of a connection established with
  17. the B<ssl> object.
  18. See L<SSL_CIPHER_get_name(3)> for more details.
  19. SSL_get_cipher_name() obtains the
  20. name of the currently used cipher.
  21. SSL_get_cipher() is identical to SSL_get_cipher_name().
  22. SSL_get_cipher_bits() is a
  23. macro to obtain the number of secret/algorithm bits used and
  24. SSL_get_cipher_version() returns the protocol name.
  25. SSL_get_pending_cipher() returns a pointer to an SSL_CIPHER object containing
  26. the description of the cipher (if any) that has been negotiated for future use
  27. on the connection established with the B<ssl> object, but is not yet in use.
  28. This may be the case during handshake processing, when control flow can be
  29. returned to the application via any of several callback methods. The internal
  30. sequencing of handshake processing and callback invocation is not guaranteed
  31. to be stable from release to release, and at present only the callback set
  32. by SSL_CTX_set_alpn_select_cb() is guaranteed to have a non-NULL return value.
  33. Other callbacks may be added to this list over time.
  34. =head1 RETURN VALUES
  35. SSL_get_current_cipher() returns the cipher actually used, or NULL if
  36. no session has been established.
  37. SSL_get_pending_cipher() returns the cipher to be used at the next change
  38. of cipher suite, or NULL if no such cipher is known.
  39. =head1 NOTES
  40. SSL_get_cipher, SSL_get_cipher_bits, SSL_get_cipher_version, and
  41. SSL_get_cipher_name are implemented as macros.
  42. =head1 SEE ALSO
  43. L<ssl(7)>, L<SSL_CIPHER_get_name(3)>
  44. =head1 COPYRIGHT
  45. Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
  46. Licensed under the OpenSSL license (the "License"). You may not use
  47. this file except in compliance with the License. You can obtain a copy
  48. in the file LICENSE in the source distribution or at
  49. L<https://www.openssl.org/source/license.html>.
  50. =cut