modified ssl_version ->ssl_get_version and modified test, docs
diff --git a/OpenSSL/SSL.py b/OpenSSL/SSL.py
index 28e5199..8fefd8f 100644
--- a/OpenSSL/SSL.py
+++ b/OpenSSL/SSL.py
@@ -1889,11 +1889,11 @@
:returns: The TLS version of the current connection, for example
the value for TLS 1.2 would be 0x303.
- :rtype: :py:class:`int`
+ :rtype: :py:class:`unicode`
"""
- version = _lib.SSL_get_version(self._ssl)
- return version
-
+ version = _ffi.string(_lib.SSL_get_version(self._ssl))
+ return version.decode("utf-8")
+
@_requires_npn
def get_next_proto_negotiated(self):