def _handshake(self, tlsConnection):
    if (self.username and self.password):
        tlsConnection.handshakeClientSRP(username=self.username, password=self.password, checker=self.checker, settings=self.settings, session=self.tlsSession)
    elif (self.username and self.sharedKey):
        tlsConnection.handshakeClientSharedKey(username=self.username, sharedKey=self.sharedKey, settings=self.settings)
    else:
        tlsConnection.handshakeClientCert(certChain=self.certChain, privateKey=self.privateKey, checker=self.checker, settings=self.settings, session=self.tlsSession)
    self.tlsSession = tlsConnection.session
def _handshake(self, tlsConnection):
    if (self.username and self.password):
        tlsConnection.handshakeClientSRP(username=self.username, password=self.password, checker=self.checker, settings=self.settings, session=self.tlsSession)
    elif (self.username and self.sharedKey):
        tlsConnection.handshakeClientSharedKey(username=self.username, sharedKey=self.sharedKey, settings=self.settings)
    else:
        tlsConnection.handshakeClientCert(certChain=self.certChain, privateKey=self.privateKey, checker=self.checker, settings=self.settings, session=self.tlsSession)
    self.tlsSession = tlsConnection.session