From 41ac0c490407e49b02c8600526e0a03860b6d4b1 Mon Sep 17 00:00:00 2001 From: Jim Shaver Date: Sun, 26 Apr 2015 23:58:52 -0400 Subject: [PATCH] modified ssl_version ->ssl_get_version and modified test, docs --- OpenSSL/SSL.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/OpenSSL/SSL.py b/OpenSSL/SSL.py index 28e519941..8fefd8f80 100644 --- a/OpenSSL/SSL.py +++ b/OpenSSL/SSL.py @@ -1889,11 +1889,11 @@ def get_protocol_version(self): :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):