':param method: One of SSLv2_METHOD, SSLv3_METHOD, SSLv23_METHOD, or
TLSv1_METHOD.'

def __init__(self, method):

    if (not isinstance(method, integer_types)):
        raise TypeError('method    must    be    an    integer')
    try:
        method_func = self._methods[method]
    except KeyError:
        raise ValueError('No    such    protocol')
    method_obj = method_func()
    if (method_obj == _ffi.NULL):
        _raise_current_error()
    context = _lib.SSL_CTX_new(method_obj)
    if (context == _ffi.NULL):
        _raise_current_error()
    context = _ffi.gc(context, _lib.SSL_CTX_free)
    self._context = context
    self._passphrase_helper = None
    self._passphrase_callback = None
    self._passphrase_userdata = None
    self._verify_helper = None
    self._verify_callback = None
    self._info_callback = None
    self._tlsext_servername_callback = None
    self._app_data = None
    self._npn_advertise_helper = None
    self._npn_advertise_callback = None
    self._npn_select_helper = None
    self._npn_select_callback = None
    self._alpn_select_helper = None
    self._alpn_select_callback = None
    self.set_mode(_lib.SSL_MODE_ENABLE_PARTIAL_WRITE)
