Beispiel #1
0
    def test_no_matching_kex_algs(self):
        """Test no matching key exchange algorithms"""

        conn = yield from self.connect()

        conn.send_packet(MSG_KEXINIT, os.urandom(16), NameList([b'xxx']),
                         NameList([]), NameList([]), NameList([]),
                         NameList([]), NameList([]), NameList([]),
                         NameList([]), NameList([]), NameList([]),
                         Boolean(False), UInt32(0))

        yield from conn.wait_closed()
Beispiel #2
0
    def test_no_matching_host_key_algs(self):
        """Test no matching server host key algorithms"""

        conn = yield from self.connect()

        conn.send_packet(MSG_KEXINIT, os.urandom(16),
                         NameList([b'ecdh-sha2-nistp521']), NameList([b'xxx']),
                         NameList([]), NameList([]), NameList([]),
                         NameList([]), NameList([]), NameList([]),
                         NameList([]), NameList([]), Boolean(False), UInt32(0))

        yield from conn.wait_closed()
Beispiel #3
0
    def test_unexpected_userauth_failure(self):
        """Test unexpected userauth failure response"""

        conn = yield from self.connect()

        conn.send_packet(MSG_USERAUTH_FAILURE, NameList([]), Boolean(False))

        yield from conn.wait_closed()
Beispiel #4
0
    def send_userauth_failure(self, partial_success):
        """Send a user authentication failure response"""

        self._auth = None
        self.send_packet(MSG_USERAUTH_FAILURE, NameList([]),
                         Boolean(partial_success))