SSL_get_version.pod 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. =pod
  2. =head1 NAME
  3. SSL_client_version, SSL_get_version, SSL_is_dtls, SSL_version - get the
  4. protocol information of a connection
  5. =head1 SYNOPSIS
  6. #include <openssl/ssl.h>
  7. int SSL_client_version(const SSL *s);
  8. const char *SSL_get_version(const SSL *ssl);
  9. int SSL_is_dtls(const SSL *ssl);
  10. int SSL_version(const SSL *s);
  11. =head1 DESCRIPTION
  12. SSL_client_version() returns the protocol version used by the client when
  13. initiating the connection.
  14. SSL_get_version() returns the name of the protocol used for the
  15. connection.
  16. SSL_is_dtls() returns one if the connection is using DTLS, zero if not.
  17. SSL_version() returns the protocol version used for the connection.
  18. =head1 RETURN VALUES
  19. SSL_get_version() returns one of the following strings:
  20. =over 4
  21. =item SSLv3
  22. The connection uses the SSLv3 protocol.
  23. =item TLSv1
  24. The connection uses the TLSv1.0 protocol.
  25. =item TLSv1.1
  26. The connection uses the TLSv1.1 protocol.
  27. =item TLSv1.2
  28. The connection uses the TLSv1.2 protocol.
  29. =item TLSv1.3
  30. The connection uses the TLSv1.3 protocol.
  31. =item unknown
  32. This indicates that no version has been set (no connection established).
  33. =back
  34. SSL_version() and SSL_client_version() return an integer which could include any of
  35. the following:
  36. =over 4
  37. =item SSL3_VERSION
  38. The connection uses the SSLv3 protocol.
  39. =item TLS1_VERSION
  40. The connection uses the TLSv1.0 protocol.
  41. =item TLS1_1_VERSION
  42. The connection uses the TLSv1.1 protocol.
  43. =item TLS1_2_VERSION
  44. The connection uses the TLSv1.2 protocol.
  45. =item TLS1_3_VERSION
  46. The connection uses the TLSv1.3 protocol.
  47. =back
  48. =head1 SEE ALSO
  49. L<ssl(7)>
  50. =head1 HISTORY
  51. SSL_is_dtls() was added in OpenSSL 1.1.0.
  52. =head1 COPYRIGHT
  53. Copyright 2001-2017 The OpenSSL Project Authors. All Rights Reserved.
  54. Licensed under the OpenSSL license (the "License"). You may not use
  55. this file except in compliance with the License. You can obtain a copy
  56. in the file LICENSE in the source distribution or at
  57. L<https://www.openssl.org/source/license.html>.
  58. =cut