예제 #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()
예제 #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()
예제 #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()
예제 #4
0
파일: test_auth.py 프로젝트: yyaan/asyncssh
    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))