whitespace: three blank lines between top-level suites, two blank lines between indented suites
diff --git a/OpenSSL/SSL.py b/OpenSSL/SSL.py
index 7e2066c..9a3151d 100644
--- a/OpenSSL/SSL.py
+++ b/OpenSSL/SSL.py
@@ -1417,6 +1417,7 @@
if not result:
_raise_current_error()
+
def get_cipher_name(self):
"""
Obtain the name of the currently used cipher.
@@ -1429,6 +1430,7 @@
else:
return _native(_ffi.string(_lib.SSL_CIPHER_get_name(cipher)))
+
def get_cipher_bits(self):
"""
Obtain the number of secret bits of the currently used cipher.
@@ -1441,6 +1443,7 @@
else:
return _lib.SSL_CIPHER_get_bits(cipher, _ffi.NULL)
+
def get_cipher_version(self):
"""
Obtain the protocol name of the currently used cipher.
diff --git a/OpenSSL/test/test_ssl.py b/OpenSSL/test/test_ssl.py
index 535c935..1f9f5c4 100644
--- a/OpenSSL/test/test_ssl.py
+++ b/OpenSSL/test/test_ssl.py
@@ -1941,6 +1941,7 @@
conn = Connection(ctx, None)
self.assertTrue(conn.get_cipher_name() is None)
+
def test_get_cipher_name(self):
"""
:py:obj:`Connection.get_cipher_name` returns the name of the currently
@@ -1955,6 +1956,7 @@
self.assertEqual(server_cipher_name, client_cipher_name)
+
def test_get_cipher_version_before_connect(self):
"""
:py:obj:`Connection.get_cipher_version` returns :py:obj:`None`
@@ -1964,6 +1966,7 @@
conn = Connection(ctx, None)
self.assertTrue(conn.get_cipher_version() is None)
+
def test_get_cipher_version(self):
"""
:py:obj:`Connection.get_cipher_version` returns the protocol name of the currently
@@ -1978,6 +1981,7 @@
self.assertEqual(server_cipher_version, client_cipher_version)
+
def test_get_cipher_bits_before_connect(self):
"""
:py:obj:`Connection.get_cipher_bits` returns :py:obj:`None`
@@ -1987,6 +1991,7 @@
conn = Connection(ctx, None)
self.assertTrue(conn.get_cipher_bits() is None)
+
def test_get_cipher_bits(self):
"""
:py:obj:`Connection.get_cipher_bits` returns the number of secret bits of the currently
@@ -2001,6 +2006,8 @@
self.assertEqual(server_cipher_bits, client_cipher_bits)
+
+
class ConnectionGetCipherListTests(TestCase):
"""
Tests for :py:obj:`Connection.get_cipher_list`.