def __init__(self, data=None): BIO.__init__(self) self._pyfree = 1 if data is None: self.bio = m2.bio_new(m2.bio_s_mem()) else: self.data = data self.bio = m2.bio_new_mem_buf(data)
def __init__(self, under_bio, mode='rwb', _pyfree=1): BIO.__init__(self, _pyfree=_pyfree) self.io = m2.bio_new(m2.bio_f_buffer()) self.bio = m2.bio_push(self.io, under_bio._ptr()) # This reference keeps the underlying BIO alive while we're not closed. self._under_bio = under_bio if 'w' in mode: self.write_closed = 0 else: self.write_closed = 1
def __init__(self, _pyfree=1): BIO.__init__(self, _pyfree) self.bio = m2.bio_new(m2.bio_f_ssl()) self.closed = 0
def __init__(self, obio): BIO.__init__(self, _pyfree=1) self.obio = obio self.bio = m2.bio_new(m2.bio_f_cipher()) self.closed = 0
def __init__(self, data=None): BIO.__init__(self) self.bio = m2.bio_new(m2.bio_s_mem()) self._pyfree = 1 if data is not None: m2.bio_write(self.bio, data)