'Obtain the protocol version of the currently used cipher.
:returns: The protocol name of the currently used cipher
or :py:obj:`None` if no connection has been established.
:rtype: :py:class:`unicode` or :py:class:`NoneType`'

def get_cipher_version(self):

    cipher = _lib.SSL_get_current_cipher(self._ssl)
    if (cipher == _ffi.NULL):
        return None
    else:
        version = _ffi.string(_lib.SSL_CIPHER_get_version(cipher))
        return version.decode('utf-8')
