/external/openssh/regress/unittests/match/ |
D | tests.c | 27 ASSERT_INT_EQ(match_pattern("", ""), 1); in tests() 28 ASSERT_INT_EQ(match_pattern("", "aaa"), 0); in tests() 29 ASSERT_INT_EQ(match_pattern("aaa", ""), 0); in tests() 30 ASSERT_INT_EQ(match_pattern("aaa", "aaaa"), 0); in tests() 31 ASSERT_INT_EQ(match_pattern("aaaa", "aaa"), 0); in tests() 35 ASSERT_INT_EQ(match_pattern("", "*"), 1); in tests() 36 ASSERT_INT_EQ(match_pattern("a", "?"), 1); in tests() 37 ASSERT_INT_EQ(match_pattern("aa", "a?"), 1); in tests() 38 ASSERT_INT_EQ(match_pattern("a", "*"), 1); in tests() 39 ASSERT_INT_EQ(match_pattern("aa", "a*"), 1); in tests() [all …]
|
/external/openssh/regress/unittests/sshbuf/ |
D | test_sshbuf_getput_basic.c | 80 ASSERT_INT_EQ(sshbuf_put(p1, x, 5), 0); in sshbuf_getput_basic_tests() 92 ASSERT_INT_EQ(sshbuf_get(p1, d2, 4), 0); in sshbuf_getput_basic_tests() 100 ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE); in sshbuf_getput_basic_tests() 106 ASSERT_INT_EQ(sshbuf_set_max_size(p1, 4), 0); in sshbuf_getput_basic_tests() 108 ASSERT_INT_EQ(r, SSH_ERR_NO_BUFFER_SPACE); in sshbuf_getput_basic_tests() 116 ASSERT_INT_EQ(sshbuf_put(p1, x, 10), 0); in sshbuf_getput_basic_tests() 118 ASSERT_INT_EQ(sshbuf_get_u64(p1, &v64), 0); in sshbuf_getput_basic_tests() 126 ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE); in sshbuf_getput_basic_tests() 134 ASSERT_INT_EQ(sshbuf_put(p1, x, 10), 0); in sshbuf_getput_basic_tests() 136 ASSERT_INT_EQ(sshbuf_get_u32(p1, &v32), 0); in sshbuf_getput_basic_tests() [all …]
|
D | test_sshbuf_getput_crypto.c | 84 ASSERT_INT_EQ(sshbuf_put_bignum1(p1, bn), 0); in sshbuf_getput_crypto_tests() 96 ASSERT_INT_EQ(sshbuf_set_max_size(p1, sizeof(expbn1) + 1), 0); in sshbuf_getput_crypto_tests() 98 ASSERT_INT_EQ(r, SSH_ERR_NO_BUFFER_SPACE); in sshbuf_getput_crypto_tests() 108 ASSERT_INT_EQ(sshbuf_put_bignum1(p1, bn), 0); in sshbuf_getput_crypto_tests() 120 ASSERT_INT_EQ(sshbuf_set_max_size(p1, sizeof(expbn1) + 1), 0); in sshbuf_getput_crypto_tests() 122 ASSERT_INT_EQ(r, SSH_ERR_NO_BUFFER_SPACE); in sshbuf_getput_crypto_tests() 132 ASSERT_INT_EQ(sshbuf_put_bignum2(p1, bn), 0); in sshbuf_getput_crypto_tests() 144 ASSERT_INT_EQ(sshbuf_set_max_size(p1, sizeof(expbn1) + 3), 0); in sshbuf_getput_crypto_tests() 146 ASSERT_INT_EQ(r, SSH_ERR_NO_BUFFER_SPACE); in sshbuf_getput_crypto_tests() 156 ASSERT_INT_EQ(sshbuf_put_bignum2(p1, bn), 0); in sshbuf_getput_crypto_tests() [all …]
|
D | test_sshbuf.c | 54 ASSERT_INT_EQ(sshbuf_set_max_size(p1, 65536), 0); in sshbuf_tests() 69 ASSERT_INT_EQ(sshbuf_consume(p1, 0), 0); in sshbuf_tests() 70 ASSERT_INT_EQ(sshbuf_consume(p1, 1), SSH_ERR_MESSAGE_INCOMPLETE); in sshbuf_tests() 77 ASSERT_INT_EQ(sshbuf_consume_end(p1, 0), 0); in sshbuf_tests() 78 ASSERT_INT_EQ(sshbuf_consume_end(p1, 1), SSH_ERR_MESSAGE_INCOMPLETE); in sshbuf_tests() 86 ASSERT_INT_EQ(r, 0); in sshbuf_tests() 90 ASSERT_INT_EQ(r, 0); in sshbuf_tests() 112 ASSERT_INT_EQ(sshbuf_consume(p1, 0), 0); in sshbuf_tests() 115 ASSERT_INT_EQ(r, SSH_ERR_MESSAGE_INCOMPLETE); in sshbuf_tests() 117 ASSERT_INT_EQ(sshbuf_consume(p1, 1), 0); in sshbuf_tests() [all …]
|
D | test_sshbuf_fixed.c | 42 ASSERT_INT_EQ(sshbuf_check_reserve(p1, 1), SSH_ERR_BUFFER_READ_ONLY); in sshbuf_fixed() 43 ASSERT_INT_EQ(sshbuf_reserve(p1, 1, NULL), SSH_ERR_BUFFER_READ_ONLY); in sshbuf_fixed() 44 ASSERT_INT_EQ(sshbuf_set_max_size(p1, 200), SSH_ERR_BUFFER_READ_ONLY); in sshbuf_fixed() 45 ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x12345678), SSH_ERR_BUFFER_READ_ONLY); in sshbuf_fixed() 55 ASSERT_INT_EQ(sshbuf_get_u8(p1, &c), 0); in sshbuf_fixed() 58 ASSERT_INT_EQ(sshbuf_get_u32(p1, &i), 0); in sshbuf_fixed() 61 ASSERT_INT_EQ(sshbuf_get_cstring(p1, &s, &l), 0); in sshbuf_fixed() 74 ASSERT_INT_EQ(sshbuf_put(p1, test_buf, sizeof(test_buf) - 1), 0); in sshbuf_fixed() 86 ASSERT_INT_EQ(sshbuf_get_u8(p2, &c), 0); in sshbuf_fixed() 89 ASSERT_INT_EQ(sshbuf_get_u32(p2, &i), 0); in sshbuf_fixed() [all …]
|
D | test_sshbuf_misc.c | 38 ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x12345678), 0); in sshbuf_misc_tests() 43 ASSERT_INT_EQ(ferror(out), 0); in sshbuf_misc_tests() 55 ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x12345678), 0); in sshbuf_misc_tests() 66 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x11), 0); in sshbuf_misc_tests() 77 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x11), 0); in sshbuf_misc_tests() 78 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x22), 0); in sshbuf_misc_tests() 89 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x11), 0); in sshbuf_misc_tests() 90 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x22), 0); in sshbuf_misc_tests() 91 ASSERT_INT_EQ(sshbuf_put_u8(p1, 0x33), 0); in sshbuf_misc_tests() 102 ASSERT_INT_EQ(sshbuf_reserve(p1, 8192, NULL), 0); in sshbuf_misc_tests() [all …]
|
D | test_sshbuf_fuzz.c | 40 ASSERT_INT_EQ(sshbuf_set_max_size(p1, 16 * 1024), 0); in sshbuf_fuzz_tests() 107 ASSERT_INT_EQ(sshbuf_set_max_size(p1, in sshbuf_fuzz_tests()
|
D | test_sshbuf_getput_fuzz.c | 48 ASSERT_INT_EQ(sshbuf_put(p1, blob, len), 0); in attempt_parse_blob()
|
/external/openssh/regress/unittests/sshkey/ |
D | test_sshkey.c | 46 ASSERT_INT_EQ(sshbuf_put_cstring(b, name), 0); in put_opt() 48 ASSERT_INT_EQ(sshbuf_put_cstring(sect, value), 0); in put_opt() 49 ASSERT_INT_EQ(sshbuf_put_stringb(b, sect), 0); in put_opt() 64 ASSERT_INT_EQ(sshkey_putb(ca_key, ca_buf), 0); in build_cert() 72 ASSERT_INT_EQ(sshkey_putb_plain(k, pk), 0); in build_cert() 73 ASSERT_INT_EQ(sshbuf_skip_string(pk), 0); in build_cert() 77 ASSERT_INT_EQ(sshbuf_put_cstring(principals, "gsamsa"), 0); in build_cert() 78 ASSERT_INT_EQ(sshbuf_put_cstring(principals, "gregor"), 0); in build_cert() 89 ASSERT_INT_EQ(sshbuf_put_cstring(b, type), 0); in build_cert() 90 ASSERT_INT_EQ(sshbuf_put_cstring(b, "noncenoncenonce!"), 0); /* nonce */ in build_cert() [all …]
|
D | test_file.c | 57 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0); in sshkey_file_tests() 67 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, in sshkey_file_tests() 71 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests() 76 ASSERT_INT_EQ(sshkey_load_public(test_data_file("rsa1_1.pub"), &k2, in sshkey_file_tests() 79 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests() 106 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0); in sshkey_file_tests() 122 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, in sshkey_file_tests() 126 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests() 132 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k2, NULL), 0); in sshkey_file_tests() 135 ASSERT_INT_EQ(sshkey_equal(k1, k2), 1); in sshkey_file_tests() [all …]
|
D | test_fuzz.c | 56 ASSERT_INT_EQ(sshkey_putb(k, buf), 0); in public_fuzz() 62 ASSERT_INT_EQ(sshkey_from_blob(sshbuf_ptr(buf), sshbuf_len(buf), in public_fuzz() 81 ASSERT_INT_EQ(sshkey_sign(k, &sig, &l, c, sizeof(c), sig_alg, 0), 0); in sig_fuzz() 86 ASSERT_INT_EQ(sshkey_verify(k, sig, l, c, sizeof(c), 0), 0); in sig_fuzz() 113 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0); in sshkey_fuzz_tests() 120 ASSERT_INT_EQ(r, 0); in sshkey_fuzz_tests() 134 ASSERT_INT_EQ(sshkey_parse_public_rsa1_fileblob(buf, &k1, NULL), 0); in sshkey_fuzz_tests() 141 ASSERT_INT_EQ(r, 0); in sshkey_fuzz_tests() 155 ASSERT_INT_EQ(sshkey_parse_private_fileblob(buf, "", &k1, NULL), 0); in sshkey_fuzz_tests() 162 ASSERT_INT_EQ(r, 0); in sshkey_fuzz_tests() [all …]
|
D | common.c | 47 ASSERT_INT_EQ(sshkey_load_file(fd, ret), 0); in load_file() 64 ASSERT_INT_EQ(sshbuf_consume_end(ret, 1), 0); in load_text_file() 69 ASSERT_INT_EQ(sshbuf_put_u8(ret, 0), 0); in load_text_file()
|
/external/openssh/regress/unittests/bitmap/ |
D | tests.c | 54 ASSERT_INT_EQ(bitmap_set_bit(b, i), 0); in tests() 55 ASSERT_INT_EQ(BN_set_bit(bn, i), 1); in tests() 58 ASSERT_INT_EQ(bitmap_set_bit(b, j), 0); in tests() 59 ASSERT_INT_EQ(BN_set_bit(bn, j), 1); in tests() 62 ASSERT_INT_EQ(bitmap_set_bit(b, k), 0); in tests() 63 ASSERT_INT_EQ(BN_set_bit(bn, k), 1); in tests() 69 ASSERT_INT_EQ(BN_is_bit_set(bn, n), in tests() 75 ASSERT_INT_EQ(BN_num_bits(bn), in tests() 77 ASSERT_INT_EQ(BN_num_bytes(bn), in tests() 85 ASSERT_INT_EQ(bitmap_to_string(b, bbuf, in tests() [all …]
|
/external/openssh/regress/unittests/kex/ |
D | test_kex.c | 75 ASSERT_INT_EQ(r, 0); in run_kex() 76 ASSERT_INT_EQ(server->kex->done, 1); in run_kex() 77 ASSERT_INT_EQ(client->kex->done, 1); in run_kex() 91 ASSERT_INT_EQ(sshkey_generate(keytype, bits, &private), 0); in do_kex_with_key() 95 ASSERT_INT_EQ(sshkey_from_private(private, &public), 0); in do_kex_with_key() 105 ASSERT_INT_EQ(ssh_init(&client, 0, &kex_params), 0); in do_kex_with_key() 106 ASSERT_INT_EQ(ssh_init(&server, 1, &kex_params), 0); in do_kex_with_key() 112 ASSERT_INT_EQ(ssh_add_hostkey(server, private), 0); in do_kex_with_key() 113 ASSERT_INT_EQ(ssh_add_hostkey(client, public), 0); in do_kex_with_key() 121 ASSERT_INT_EQ(kex_send_kexinit(client), 0); in do_kex_with_key() [all …]
|
/external/openssh/regress/misc/kexfuzz/ |
D | kexfuzz.c | 144 #define ASSERT_INT_EQ(a, b) \ macro 193 ASSERT_INT_EQ(r, 0); in run_kex() 194 ASSERT_INT_EQ(server->kex->done, 1); in run_kex() 195 ASSERT_INT_EQ(client->kex->done, 1); in run_kex() 212 ASSERT_INT_EQ(sshkey_from_private(prvkey, &pubkey), 0); in do_kex_with_key() 222 ASSERT_INT_EQ(ssh_init(&client, 0, &kex_params), 0); in do_kex_with_key() 223 ASSERT_INT_EQ(ssh_init(&server, 1, &kex_params), 0); in do_kex_with_key() 224 ASSERT_INT_EQ(ssh_init(&server2, 1, NULL), 0); in do_kex_with_key() 244 ASSERT_INT_EQ(ssh_add_hostkey(server, prvkey), 0); in do_kex_with_key() 245 ASSERT_INT_EQ(ssh_add_hostkey(client, pubkey), 0); in do_kex_with_key() [all …]
|
/external/openssh/regress/unittests/hostkeys/ |
D | test_iterate.c | 122 ASSERT_INT_EQ(l->marker, expected->l.marker); in check() 130 ASSERT_INT_EQ(l->keytype, expected_keytype); in check() 136 ASSERT_INT_EQ(sshkey_equal(l->key, expected->l.key), 1); in check() 161 ASSERT_INT_EQ(sshkey_load_public( in prepare_expected() 981 ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"), in test_iterate() 991 ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"), in test_iterate() 1002 ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"), in test_iterate() 1013 ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"), in test_iterate() 1024 ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"), in test_iterate() 1035 ASSERT_INT_EQ(hostkeys_foreach(test_data_file("known_hosts"), in test_iterate() [all …]
|
/external/openssh/regress/unittests/utf8/ |
D | tests.c | 27 ASSERT_INT_EQ(len, -1); in badarg() 29 ASSERT_INT_EQ(width, 0); in badarg() 48 ASSERT_INT_EQ(len, wantlen); in one() 50 ASSERT_INT_EQ(width, wantwidth); in one()
|
/external/openssh/regress/unittests/test_helper/ |
D | test_helper.h | 110 #define ASSERT_INT_EQ(a1, a2) \ macro
|