'Set the verify mode and verify callback
:param mode: The verify mode, this is either VERIFY_NONE or
VERIFY_PEER combined with possible other flags
:param callback: The Python callback to use
:return: None
See SSL_CTX_set_verify(3SSL) for further details.'

def set_verify(self, mode, callback):

    if (not isinstance(mode, integer_types)):
        raise TypeError('mode    must    be    an    integer')
    if (not callable(callback)):
        raise TypeError('callback    must    be    callable')
    self._verify_helper = _VerifyHelper(callback)
    self._verify_callback = self._verify_helper.callback
    _lib.SSL_CTX_set_verify(self._context, mode, self._verify_callback)
