def makefile(self, mode='rb', bufsize='ignored'): r = 'r' in mode or '+' in mode w = 'w' in mode or 'a' in mode or '+' in mode b = 'b' in mode m2mode = ['', 'r'][r] + ['', 'w'][w] + ['', 'b'][b] # XXX Need to dup(). bio = BIO.BIO(self.sslbio, _close_cb=self.close) m2.bio_do_handshake(bio._ptr()) return BIO.IOBuffer(bio, m2mode, _pyfree=0)
def makefile(self, mode='rb', bufsize='ignored'): r = 'r' in mode or '+' in mode w = 'w' in mode or 'a' in mode or '+' in mode b = 'b' in mode m2mode = ['', 'r'][r] + ['', 'w'][w] + ['', 'b'][b] # XXX Need to dup(). bio = BIO.BIO(self.sslbio, _close_cb=self.close) m2.bio_do_handshake(bio._ptr()) return BIO.IOBuffer(bio, m2mode, _pyfree=0)
def do_handshake(self): # type: () -> int """Do the handshake. Return 1 if the handshake completes Return 0 or a negative number if there is a problem """ return m2.bio_do_handshake(self.bio)
def do_handshake(self): """ Do the handshake. Return 1 if the handshake completes Return 0 or a negative number if there is a problem """ return m2.bio_do_handshake(self.bio)