예제 #1
0
파일: BIO.py 프로젝트: nanki/M2Crypto
 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)
예제 #2
0
파일: BIO.py 프로젝트: nanki/M2Crypto
 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
예제 #3
0
 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
예제 #4
0
파일: BIO.py 프로젝트: nanki/M2Crypto
 def __init__(self, _pyfree=1):
     BIO.__init__(self, _pyfree)
     self.bio = m2.bio_new(m2.bio_f_ssl())
     self.closed = 0
예제 #5
0
파일: BIO.py 프로젝트: nanki/M2Crypto
 def __init__(self, obio):
     BIO.__init__(self, _pyfree=1)
     self.obio = obio
     self.bio = m2.bio_new(m2.bio_f_cipher())
     self.closed = 0
예제 #6
0
 def __init__(self, _pyfree=1):
     BIO.__init__(self, _pyfree)
     self.bio = m2.bio_new(m2.bio_f_ssl())
     self.closed = 0
예제 #7
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
예제 #8
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)
예제 #9
0
파일: BIO.py 프로젝트: kyakovenko/M2Crypto
 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)