/freebsd/crypto/openssh/regress/unittests/sshbuf/ |
H A D | test_sshbuf_fixed.c | 46 ASSERT_PTR_EQ(sshbuf_ptr(p1), test_buf); in sshbuf_fixed() 53 ASSERT_PTR_EQ(sshbuf_ptr(p1), test_buf); in sshbuf_fixed() 55 ASSERT_PTR_EQ(sshbuf_ptr(p1), test_buf + 1); in sshbuf_fixed() 58 ASSERT_PTR_EQ(sshbuf_ptr(p1), test_buf + 5); in sshbuf_fixed() 79 ASSERT_PTR_EQ(sshbuf_ptr(p2), sshbuf_ptr(p1)); in sshbuf_fixed() 80 ASSERT_PTR_NE(sshbuf_ptr(p1), NULL); in sshbuf_fixed() 81 ASSERT_PTR_NE(sshbuf_ptr(p2), NULL); in sshbuf_fixed() 86 ASSERT_PTR_EQ(sshbuf_ptr(p2), sshbuf_ptr(p1) + 1); in sshbuf_fixed() 89 ASSERT_PTR_EQ(sshbuf_ptr(p2), sshbuf_ptr(p1) + 5); in sshbuf_fixed() 115 ASSERT_PTR_NE(sshbuf_ptr(p3), NULL); in sshbuf_fixed() [all …]
|
H A D | test_sshbuf_fuzz.c | 46 ASSERT_PTR_NE(sshbuf_ptr(p1), NULL); in sshbuf_fuzz_tests() 47 ASSERT_MEM_ZERO_NE(sshbuf_ptr(p1), sshbuf_len(p1)); in sshbuf_fuzz_tests() 106 ASSERT_PTR_NE(sshbuf_ptr(p1), NULL); in sshbuf_fuzz_tests() 107 ASSERT_MEM_ZERO_NE(sshbuf_ptr(p1), sshbuf_len(p1)); in sshbuf_fuzz_tests() 124 ASSERT_PTR_NE(sshbuf_ptr(p1), NULL); in sshbuf_fuzz_tests() 127 ASSERT_PTR_NE(sshbuf_ptr(p1), NULL); in sshbuf_fuzz_tests() 128 ASSERT_MEM_ZERO_NE(sshbuf_ptr(p1), sshbuf_len(p1)); in sshbuf_fuzz_tests()
|
H A D | test_sshbuf_getput_basic.c | 81 cd = sshbuf_ptr(p1); in sshbuf_getput_basic_tests() 94 ASSERT_U8_EQ(*(sshbuf_ptr(p1)), 0x55); in sshbuf_getput_basic_tests() 101 ASSERT_U8_EQ(*(sshbuf_ptr(p1)), 0x55); in sshbuf_getput_basic_tests() 204 ASSERT_MEM_EQ(sshbuf_ptr(p1), x, 8); in sshbuf_getput_basic_tests() 214 ASSERT_MEM_EQ(sshbuf_ptr(p1), x, 8); in sshbuf_getput_basic_tests() 233 ASSERT_MEM_EQ(sshbuf_ptr(p1), x, 4); in sshbuf_getput_basic_tests() 243 ASSERT_MEM_EQ(sshbuf_ptr(p1), x, 4); in sshbuf_getput_basic_tests() 262 ASSERT_MEM_EQ(sshbuf_ptr(p1), x, 2); in sshbuf_getput_basic_tests() 272 ASSERT_MEM_EQ(sshbuf_ptr(p1), x, 2); in sshbuf_getput_basic_tests() 383 ASSERT_U32_EQ(PEEK_U32(sshbuf_ptr(p1)), sizeof(x)); in sshbuf_getput_basic_tests() [all …]
|
H A D | test_sshbuf.c | 105 cdp = sshbuf_ptr(p1); in sshbuf_tests() 122 cdp = sshbuf_ptr(p1); in sshbuf_tests() 127 cdp = sshbuf_ptr(p1); in sshbuf_tests() 156 cdp = sshbuf_ptr(p1); in sshbuf_tests() 196 cdp = sshbuf_ptr(p1); in sshbuf_tests() 218 cdp = sshbuf_ptr(p1); in sshbuf_tests()
|
H A D | test_sshbuf_getput_crypto.c | 86 ASSERT_U32_EQ(PEEK_U32(sshbuf_ptr(p1)), (u_int32_t)BN_num_bytes(bn)); in sshbuf_getput_crypto_tests() 87 ASSERT_MEM_EQ(sshbuf_ptr(p1) + 4, expbn1, sizeof(expbn1)); in sshbuf_getput_crypto_tests() 110 ASSERT_U32_EQ(PEEK_U32(sshbuf_ptr(p1)), (u_int32_t)BN_num_bytes(bn) + 1); in sshbuf_getput_crypto_tests() 111 ASSERT_U8_EQ(*(sshbuf_ptr(p1) + 4), 0x00); in sshbuf_getput_crypto_tests() 112 ASSERT_MEM_EQ(sshbuf_ptr(p1) + 5, expbn2, sizeof(expbn2)); in sshbuf_getput_crypto_tests()
|
H A D | test_sshbuf_misc.c | 116 ASSERT_U8_EQ(*sshbuf_ptr(p1), 0xd0); in sshbuf_misc_tests() 125 ASSERT_U16_EQ(PEEK_U16(sshbuf_ptr(p1)), 0xd00f); in sshbuf_misc_tests() 134 ASSERT_U32_EQ(PEEK_U32(sshbuf_ptr(p1)), 0xd00fd00f); in sshbuf_misc_tests()
|
/freebsd/crypto/openssh/regress/unittests/sshkey/ |
H A D | test_file.c | 78 (const char *)sshbuf_ptr(pw), &k2, NULL), 0); in sshkey_file_tests() 97 (const char *)sshbuf_ptr(pw), &k2, NULL), 0); in sshkey_file_tests() 142 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf)); in sshkey_file_tests() 151 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf)); in sshkey_file_tests() 161 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf)); in sshkey_file_tests() 188 (const char *)sshbuf_ptr(pw), &k2, NULL), 0); in sshkey_file_tests() 207 (const char *)sshbuf_ptr(pw), &k2, NULL), 0); in sshkey_file_tests() 234 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf)); in sshkey_file_tests() 243 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf)); in sshkey_file_tests() 253 ASSERT_STRING_EQ(cp, (const char *)sshbuf_ptr(buf)); in sshkey_file_tests() [all …]
|
H A D | common.c | 59 for (p = sshbuf_ptr(ret); sshbuf_len(ret) > 0;) { in load_text_file() 81 ASSERT_INT_NE(BN_hex2bn(&ret, (const char *)sshbuf_ptr(buf)), 0); in load_bignum()
|
H A D | test_sshkey.c | 106 sshbuf_ptr(b), sshbuf_len(b), sig_alg, NULL, NULL, 0), 0); in build_cert() 452 ASSERT_INT_EQ(sshkey_from_blob(sshbuf_ptr(b), sshbuf_len(b), &k3), 0); in sshkey_tests() 527 ASSERT_INT_EQ(sshkey_from_blob(sshbuf_ptr(b), sshbuf_len(b), &k4), in sshkey_tests()
|
/freebsd/crypto/openssh/ |
H A D | sshbuf-misc.c | 70 sshbuf_dump_data(sshbuf_ptr(buf), sshbuf_len(buf), f); in sshbuf_dump() 77 const u_char *p = sshbuf_ptr(buf); in sshbuf_dtob16() 107 if (b64_ntop(sshbuf_ptr(d), sshbuf_len(d), s, slen) == -1) { in sshbuf_dtob64() 187 if (l <= 1 || sshbuf_ptr(b) == NULL) { in sshbuf_dtourlb64() 191 if (sshbuf_ptr(b)[l - 1] != '=') in sshbuf_dtourlb64() 217 const u_char *p = NULL, *s = sshbuf_ptr(buf); in sshbuf_dup_string() 241 if (sshbuf_ptr(b) == NULL) in sshbuf_cmp() 247 if (timingsafe_bcmp(sshbuf_ptr(b) + offset, s, len) != 0) in sshbuf_cmp() 260 if (sshbuf_ptr(b) == NULL) in sshbuf_find() 266 if ((p = memmem(sshbuf_ptr(b) + start_offset, in sshbuf_find() [all …]
|
H A D | kexsntrup761x25519.c | 95 client_pub = sshbuf_ptr(client_blob); in kex_kem_sntrup761x25519_enc() 137 sshbuf_ptr(buf), sshbuf_len(buf)); in kex_kem_sntrup761x25519_enc() 145 dump_digest("encoded shared secret:", sshbuf_ptr(buf), sshbuf_len(buf)); in kex_kem_sntrup761x25519_enc() 177 ciphertext = sshbuf_ptr(server_blob); in kex_kem_sntrup761x25519_dec() 202 sshbuf_ptr(buf), sshbuf_len(buf)); in kex_kem_sntrup761x25519_dec() 209 dump_digest("encoded shared secret:", sshbuf_ptr(buf), sshbuf_len(buf)); in kex_kem_sntrup761x25519_dec()
|
H A D | sshbuf-getput-basic.c | 37 const u_char *p = sshbuf_ptr(buf); in sshbuf_get() 50 const u_char *p = sshbuf_ptr(buf); in sshbuf_get_u64() 63 const u_char *p = sshbuf_ptr(buf); in sshbuf_get_u32() 76 const u_char *p = sshbuf_ptr(buf); in sshbuf_get_u16() 89 const u_char *p = sshbuf_ptr(buf); in sshbuf_get_u8() 102 if (sshbuf_ptr(buf) == NULL) /* calls sshbuf_check_sanity() */ in check_offset() 122 *p = sshbuf_ptr(buf) + offset; in check_roffset() 244 const u_char *p = sshbuf_ptr(buf); in sshbuf_peek_string_direct() 343 return sshbuf_put(buf, sshbuf_ptr(v), sshbuf_len(v)); in sshbuf_putb() 543 return sshbuf_put_string(buf, sshbuf_ptr(v), sshbuf_len(v)); in sshbuf_put_stringb()
|
H A D | kexc25519.c | 131 client_pub = sshbuf_ptr(client_blob); in kex_c25519_enc() 152 dump_digest("encoded shared secret:", sshbuf_ptr(buf), sshbuf_len(buf)); in kex_c25519_enc() 179 server_pub = sshbuf_ptr(server_blob); in kex_c25519_dec() 192 dump_digest("encoded shared secret:", sshbuf_ptr(buf), sshbuf_len(buf)); in kex_c25519_dec()
|
H A D | packet.c | 398 sshbuf_ptr(state->incoming_packet), dlen, in ssh_packet_stop_discard() 1096 type = (sshbuf_ptr(state->outgoing_packet))[5]; in ssh_packet_send2_wrapped() 1180 sshbuf_ptr(state->outgoing_packet), len, in ssh_packet_send2_wrapped() 1190 sshbuf_ptr(state->outgoing_packet), in ssh_packet_send2_wrapped() 1262 type = sshbuf_ptr(state->outgoing_packet)[5]; in ssh_packet_send2() 1440 cp = sshbuf_ptr(state->input); in ssh_packet_read_poll2_mux() 1502 sshbuf_ptr(state->input), sshbuf_len(state->input)) != 0) in ssh_packet_read_poll2() 1527 state->p_send.seqnr, cp, sshbuf_ptr(state->input), in ssh_packet_read_poll2() 1530 state->packlen = PEEK_U32(sshbuf_ptr(state->incoming_packet)); in ssh_packet_read_poll2() 1583 sshbuf_ptr(state->input), aadlen + need, in ssh_packet_read_poll2() [all …]
|
H A D | digest-openssl.c | 155 return ssh_digest_update(ctx, sshbuf_ptr(b), sshbuf_len(b)); in ssh_digest_update_buffer() 205 return ssh_digest_memory(alg, sshbuf_ptr(b), sshbuf_len(b), d, dlen); in ssh_digest_buffer()
|
H A D | digest-libc.c | 215 return ssh_digest_update(ctx, sshbuf_ptr(b), sshbuf_len(b)); in ssh_digest_update_buffer() 265 return ssh_digest_memory(alg, sshbuf_ptr(b), sshbuf_len(b), d, dlen); in ssh_digest_buffer()
|
H A D | ssh_api.c | 312 return sshbuf_ptr(output); in ssh_output_ptr() 339 const u_char *s = sshbuf_ptr(input); in _ssh_read_banner() 366 memcmp(sshbuf_ptr(banner), "SSH-", 4) == 0) in _ssh_read_banner() 369 sshbuf_ptr(banner)); in _ssh_read_banner()
|
H A D | ssh-pkcs11-helper.c | 266 cp = sshbuf_ptr(iqueue); in process() 401 len = write(out, sshbuf_ptr(oqueue), in main()
|
H A D | sshbuf.c | 149 if ((ret = sshbuf_from(sshbuf_ptr(buf), sshbuf_len(buf))) == NULL) in sshbuf_fromb() 297 sshbuf_ptr(const struct sshbuf *buf) in sshbuf_ptr() function
|
H A D | sshkey.c | 682 if (timingsafe_bcmp(sshbuf_ptr(a->certblob), sshbuf_ptr(b->certblob), in cert_compare() 831 memcpy(*blobp, sshbuf_ptr(b), len); in to_blob() 1304 if (fwrite(sshbuf_ptr(b), sshbuf_len(b), 1, f) != 1) { in sshkey_write() 1605 sshbuf_ptr(prvbuf), sshbuf_len(prvbuf), 0, 0)) != 0) in sshkey_shield_private() 1870 sshbuf_ptr(key->cert->certblob), signed_len, NULL, 0, NULL)) != 0) in cert_parse() 2255 if ((ret = signer(ca, &sig_blob, &sig_len, sshbuf_ptr(cert), in sshkey_certify_custom() 2846 sshbuf_ptr(encrypted), sshbuf_len(encrypted), 0, authlen)) != 0) in sshkey_private_to_blob2() 2894 cp = sshbuf_ptr(blob); in private2_uudecode() 2929 if ((r = sshbuf_b64tod(decoded, (char *)sshbuf_ptr(encoded))) != 0) in private2_uudecode() 2934 memcmp(sshbuf_ptr(decoded), AUTH_MAGIC, sizeof(AUTH_MAGIC))) { in private2_uudecode() [all …]
|
H A D | ssh-agent.c | 844 if (sshbuf_ptr(a) == NULL || sshbuf_ptr(b) == NULL) in buf_equal() 848 if (timingsafe_bcmp(sshbuf_ptr(a), sshbuf_ptr(b), sshbuf_len(a)) != 0) in buf_equal() 960 sshbuf_ptr(data), sshbuf_len(data), agent_decode_alg(key, flags), in process_sign_request2() 1728 if ((r = sshkey_verify(key, sshbuf_ptr(sig), sshbuf_len(sig), in process_ext_session_bind() 1729 sshbuf_ptr(sid), sshbuf_len(sid), NULL, 0, NULL)) != 0) { in process_ext_session_bind() 1825 cp = sshbuf_ptr(e->input); in process_message() 2019 sshbuf_ptr(sockets[socknum].output), in handle_conn_write()
|
H A D | ssh-sk.c | 525 challenge = sshbuf_ptr(challenge_buf); in sshsk_enroll() 686 sshbuf_ptr(key->sk_key_handle), sshbuf_len(key->sk_key_handle), in sshsk_sign() 726 memcpy(*sigp, sshbuf_ptr(sig), sshbuf_len(sig)); in sshsk_sign()
|
H A D | kexgexs.c | 179 sshbuf_ptr(shared_secret), sshbuf_len(shared_secret), in input_kex_dh_gex_init()
|
H A D | ssh-ed25519-sk.c | 219 sm = sshbuf_ptr(encoded); in ssh_ed25519_sk_verify()
|
/freebsd/crypto/openssh/regress/misc/fuzz-harness/ |
H A D | kex_fuzz.cc | 83 if ((r = ssh_input_append(server, sshbuf_ptr(ts->sin), in run_kex() 91 if ((r = ssh_input_append(client, sshbuf_ptr(ts->cin), in run_kex() 359 if (fwrite(sshbuf_ptr(ts->smsgs), 1, in main() 370 if (fwrite(sshbuf_ptr(ts->cmsgs), 1, in main()
|