| /freebsd/crypto/openssh/regress/unittests/sshbuf/ |
| H A D | test_sshbuf_getput_basic.c | 78 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 5); in sshbuf_getput_basic_tests() 91 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1); in sshbuf_getput_basic_tests() 98 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1); in sshbuf_getput_basic_tests() 106 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1); in sshbuf_getput_basic_tests() 114 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 10); in sshbuf_getput_basic_tests() 117 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2); in sshbuf_getput_basic_tests() 121 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2); in sshbuf_getput_basic_tests() 124 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2); in sshbuf_getput_basic_tests() 132 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 10); in sshbuf_getput_basic_tests() 135 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 6); in sshbuf_getput_basic_tests() [all …]
|
| H A D | test_sshbuf.c | 52 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0); in sshbuf_tests() 100 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4); in sshbuf_tests() 113 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4); in sshbuf_tests() 115 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4); in sshbuf_tests() 118 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4); in sshbuf_tests() 120 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 3); in sshbuf_tests() 125 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1); in sshbuf_tests() 131 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 1); in sshbuf_tests() 133 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0); in sshbuf_tests() 149 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4); in sshbuf_tests() [all …]
|
| H A D | test_sshbuf_fuzz.c | 45 ASSERT_MEM_ZERO_NE(sshbuf_ptr(p1), sshbuf_len(p1)); in sshbuf_fuzz_tests() 53 sz2 = sshbuf_len(p1); in sshbuf_fuzz_tests() 59 ASSERT_SIZE_T_EQ(sshbuf_len(p1), sz2); in sshbuf_fuzz_tests() 64 ASSERT_SIZE_T_EQ(sshbuf_len(p1), sz2 + r); in sshbuf_fuzz_tests() 76 sz2 = sshbuf_len(p1); in sshbuf_fuzz_tests() 83 ASSERT_SIZE_T_EQ(sshbuf_len(p1), sz2); in sshbuf_fuzz_tests() 87 ASSERT_SIZE_T_EQ(sshbuf_len(p1), sz2 - r); in sshbuf_fuzz_tests() 105 ASSERT_MEM_ZERO_NE(sshbuf_ptr(p1), sshbuf_len(p1)); in sshbuf_fuzz_tests() 126 ASSERT_MEM_ZERO_NE(sshbuf_ptr(p1), sshbuf_len(p1)); in sshbuf_fuzz_tests()
|
| H A D | test_sshbuf_getput_crypto.c | 84 ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(expbn1) + 4); in sshbuf_getput_crypto_tests() 98 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0); in sshbuf_getput_crypto_tests() 108 ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(expbn2) + 4 + 1); /* MSB */ in sshbuf_getput_crypto_tests() 123 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0); in sshbuf_getput_crypto_tests() 134 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4 + sizeof(expbn1)); in sshbuf_getput_crypto_tests() 139 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2); in sshbuf_getput_crypto_tests() 154 ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(expbn1) + 3); in sshbuf_getput_crypto_tests() 169 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 65536 + 4); in sshbuf_getput_crypto_tests() 182 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 4 + 1 + sizeof(expbn2)); in sshbuf_getput_crypto_tests() 187 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 2); in sshbuf_getput_crypto_tests() [all …]
|
| H A D | test_sshbuf_fixed.c | 59 ASSERT_SIZE_T_EQ(sshbuf_len(p1), 0); in sshbuf_fixed() 82 ASSERT_SIZE_T_EQ(sshbuf_len(p1), sshbuf_len(p2)); in sshbuf_fixed() 90 ASSERT_SIZE_T_EQ(sshbuf_len(p2), 0); in sshbuf_fixed() 107 ASSERT_SIZE_T_EQ(sshbuf_len(p1), sizeof(test_buf) - 1); in sshbuf_fixed() 109 ASSERT_SIZE_T_EQ(sshbuf_len(p2), sizeof(test_buf) + 4 - 1); in sshbuf_fixed() 111 ASSERT_SIZE_T_EQ(sshbuf_len(p2), 0); in sshbuf_fixed() 114 ASSERT_SIZE_T_EQ(sshbuf_len(p3), sizeof(test_buf) - 1); in sshbuf_fixed()
|
| /freebsd/crypto/openssh/ |
| H A D | sshbuf-misc.c | 67 fprintf(f, "buffer len = %zu\n", sshbuf_len(buf)); in sshbuf_dump() 68 sshbuf_dump_data(sshbuf_ptr(buf), sshbuf_len(buf), f); in sshbuf_dump() 74 size_t i, j, len = sshbuf_len(buf); in sshbuf_dtob16() 134 if (d == NULL || b64 == NULL || sshbuf_len(d) >= SIZE_MAX / 2) in sshbuf_dtob64() 136 if (sshbuf_len(d) == 0) in sshbuf_dtob64() 138 slen = ((sshbuf_len(d) + 2) / 3) * 4 + 1; in sshbuf_dtob64() 141 if (b64_ntop(sshbuf_ptr(d), sshbuf_len(d), s, slen) == -1) { in sshbuf_dtob64() 213 if (sshbuf_len(d) == 0) in sshbuf_dtourlb64() 223 l = sshbuf_len(b); in sshbuf_dtourlb64() 234 l = sshbuf_len(b); in sshbuf_dtourlb64() [all …]
|
| H A D | ssh_api.c | 266 if (sshbuf_len(ssh->kex->client_version) == 0 || in ssh_packet_next() 267 sshbuf_len(ssh->kex->server_version) == 0) in ssh_packet_next() 318 *len = sshbuf_len(output); in ssh_output_ptr() 356 if (j >= sshbuf_len(input)) in _ssh_read_banner() 369 if (sshbuf_len(banner) > SSH_MAX_BANNER_LEN) in _ssh_read_banner() 372 if (sshbuf_len(banner) >= 4 && in _ssh_read_banner() 375 debug_f("%.*s", (int)sshbuf_len(banner), in _ssh_read_banner() 391 (remote_version = calloc(1, sshbuf_len(banner))) == NULL) { in _ssh_read_banner() 457 if (sshbuf_len(ssh->kex->server_version) == 0) in _ssh_exchange_banner() 460 sshbuf_len(ssh->kex->server_version) != 0 && in _ssh_exchange_banner() [all …]
|
| H A D | sshbuf-io.c | 59 if (sshbuf_len(blob) > SSHBUF_SIZE_MAX) { in sshbuf_load_fd() 65 st.st_size != (off_t)sshbuf_len(blob)) { in sshbuf_load_fd() 107 sshbuf_len(buf)) != sshbuf_len(buf) || close(fd) != 0) { in sshbuf_write_file()
|
| H A D | kexsntrup761x25519.c | 95 if (sshbuf_len(client_blob) != need) { in kex_kem_sntrup761x25519_enc() 141 sshbuf_ptr(buf), sshbuf_len(buf)); in kex_kem_sntrup761x25519_enc() 149 dump_digest("encoded shared secret:", sshbuf_ptr(buf), sshbuf_len(buf)); in kex_kem_sntrup761x25519_enc() 177 if (sshbuf_len(server_blob) != need) { in kex_kem_sntrup761x25519_dec() 206 sshbuf_ptr(buf), sshbuf_len(buf)); in kex_kem_sntrup761x25519_dec() 213 dump_digest("encoded shared secret:", sshbuf_ptr(buf), sshbuf_len(buf)); in kex_kem_sntrup761x25519_dec()
|
| H A D | kexmlkem768x25519.c | 103 if (sshbuf_len(client_blob) != need) { in kex_kem_mlkem768x25519_enc() 150 sshbuf_ptr(buf), sshbuf_len(buf)); in kex_kem_mlkem768x25519_enc() 158 dump_digest("encoded shared secret:", sshbuf_ptr(buf), sshbuf_len(buf)); in kex_kem_mlkem768x25519_enc() 189 if (sshbuf_len(server_blob) != need) { in kex_kem_mlkem768x25519_dec() 221 sshbuf_ptr(buf), sshbuf_len(buf)); in kex_kem_mlkem768x25519_dec() 228 dump_digest("encoded shared secret:", sshbuf_ptr(buf), sshbuf_len(buf)); in kex_kem_mlkem768x25519_dec()
|
| H A D | sshbuf.c | 151 if ((ret = sshbuf_from(sshbuf_ptr(buf), sshbuf_len(buf))) == NULL) in sshbuf_fromb() 281 sshbuf_len(const struct sshbuf *buf) in sshbuf_len() function 401 if (len > sshbuf_len(buf)) in sshbuf_consume() 421 if (len > sshbuf_len(buf)) in sshbuf_consume_end() 440 if (sshbuf_len(child) > sshbuf_len(buf)) in sshbuf_consume_upto_child() 446 return sshbuf_consume(buf, sshbuf_len(buf) - sshbuf_len(child)); in sshbuf_consume_upto_child()
|
| H A D | kexc25519.c | 127 if (sshbuf_len(client_blob) != CURVE25519_SIZE) { in kex_c25519_enc() 152 dump_digest("encoded shared secret:", sshbuf_ptr(buf), sshbuf_len(buf)); in kex_c25519_enc() 175 if (sshbuf_len(server_blob) != CURVE25519_SIZE) { in kex_c25519_dec() 192 dump_digest("encoded shared secret:", sshbuf_ptr(buf), sshbuf_len(buf)); in kex_c25519_dec()
|
| H A D | ssh-pkcs11-helper.c | 160 buf_len = sshbuf_len(iqueue); in process() 189 if (buf_len < sshbuf_len(iqueue)) { in process() 193 consumed = buf_len - sshbuf_len(iqueue); in process() 271 if (sshbuf_len(oqueue) > 0) in main() 295 sshbuf_len(oqueue)); in main()
|
| H A D | ssh-mldsa-eddsa.c | 123 if ((*m_primep = malloc(sshbuf_len(m_prime))) == NULL) { in construct_m_prime() 127 memcpy(*m_primep, sshbuf_ptr(m_prime), sshbuf_len(m_prime)); in construct_m_prime() 128 *m_prime_lenp = sshbuf_len(m_prime); in construct_m_prime() 405 if ((*sigp = malloc(sshbuf_len(b))) == NULL) { in ssh_mldsa44_ed25519_sign() 409 memcpy(*sigp, sshbuf_ptr(b), sshbuf_len(b)); in ssh_mldsa44_ed25519_sign() 412 *lenp = sshbuf_len(b); in ssh_mldsa44_ed25519_sign() 446 if (sshbuf_len(b) != 0) { in ssh_mldsa44_ed25519_verify()
|
| H A D | packet.c | 401 while (sshbuf_len(state->incoming_packet) < dlen) in ssh_packet_stop_discard() 435 if (sshbuf_len(state->input) >= discard) in ssh_packet_start_discard() 437 state->packet_discard = discard - sshbuf_len(state->input); in ssh_packet_start_discard() 856 if (sshbuf_len(in) == 0) in compress_buffer() 863 ssh->state->compression_out_stream.avail_in = sshbuf_len(in); in compress_buffer() 904 ssh->state->compression_in_stream.avail_in = sshbuf_len(in); in uncompress_buffer() 1257 len = sshbuf_len(state->outgoing_packet); in ssh_packet_send2_wrapped() 1272 sshbuf_len(state->outgoing_packet))); in ssh_packet_send2_wrapped() 1276 len = sshbuf_len(state->outgoing_packet); in ssh_packet_send2_wrapped() 1317 len = sshbuf_len(state->outgoing_packet); in ssh_packet_send2_wrapped() [all …]
|
| H A D | ssh-sk-helper.c | 126 if (sshbuf_len(req) != 0) in process_sign() 188 if (sshbuf_len(req) != 0) in process_enroll() 193 if (sshbuf_len(challenge) == 0) { in process_enroll() 247 if (sshbuf_len(req) != 0) in process_load_resident() 335 debug_f("received message len %zu", sshbuf_len(req)); in main() 366 debug_f("reply len %zu", sshbuf_len(resp)); in main()
|
| H A D | krl.c | 719 if (sshbuf_len(sect) != 0) { in revoked_certs_generate() 773 if (sshbuf_len(sect) != 0) { in ssh_krl_to_blob() 784 if (sshbuf_len(sect) != 0) { in ssh_krl_to_blob() 796 if (sshbuf_len(sect) != 0) { in ssh_krl_to_blob() 842 if (sshbuf_len(subsect) != 0) { in cert_extension_subsection() 849 name, critical, sshbuf_len(value)); in cert_extension_subsection() 888 while (sshbuf_len(buf) > 0) { in parse_revoked_certs() 899 while (sshbuf_len(subsect) > 0) { in parse_revoked_certs() 945 while (sshbuf_len(subsect) > 0) { in parse_revoked_certs() 965 if (sshbuf_len(subsect) > 0) { in parse_revoked_certs() [all …]
|
| H A D | nchan.c | 130 if (sshbuf_len(c->input)) { in chan_ibuf_empty() 152 if (sshbuf_len(c->output)) { in chan_obuf_empty() 262 sshbuf_len(c->output) == 0 && in chan_rcvd_ieof() 344 sshbuf_len(c->extended) > 0) { in chan_is_dead() 346 c->self, c->efd, sshbuf_len(c->extended)); in chan_is_dead()
|
| H A D | msg.c | 45 u_int mlen = sshbuf_len(m); in ssh_msg_send() 47 debug3_f("type %u len %zu", (unsigned int)type & 0xff, sshbuf_len(m)); in ssh_msg_send()
|
| H A D | ssh-ecdsa-sk.c | 189 ((flags & 0x80) == 0 /* ED */) != (sshbuf_len(extensions) == 0)) { in webauthn_check_prepare_hash() 217 if ((r = sshbuf_cmp(wrapper, 0, sshbuf_ptr(m), sshbuf_len(m))) != 0) in webauthn_check_prepare_hash() 298 if (sshbuf_len(b) != 0) { in ssh_ecdsa_sk_verify() 309 if (sshbuf_len(sigbuf) != 0) { in ssh_ecdsa_sk_verify() 406 sshbuf_ptr(original_signed), sshbuf_len(original_signed))) { in ssh_ecdsa_sk_verify()
|
| H A D | sshkey.c | 812 if (sshbuf_len(a->certblob) != sshbuf_len(b->certblob)) in cert_compare() 815 sshbuf_len(a->certblob)) != 0) in cert_compare() 889 if (sshbuf_len(key->cert->certblob) == 0) in to_blob_buf() 961 len = sshbuf_len(b); in to_blob() 1442 if (fwrite(sshbuf_ptr(b), sshbuf_len(b), 1, f) != 1) { in sshkey_write() 1696 while (sshbuf_len(prvbuf) % cipher_blocksize(cipher)) { in sshkey_shield_private() 1705 enclen = sshbuf_len(prvbuf); in sshkey_shield_private() 1711 sshbuf_ptr(prvbuf), sshbuf_len(prvbuf), 0, 0)) != 0) in sshkey_shield_private() 1762 while (sshbuf_len(decrypted)) { in private2_check_padding() 1897 signed_len = sshbuf_len(key->cert->certblob) - sshbuf_len(b); in cert_parse() [all …]
|
| /freebsd/crypto/openssh/regress/misc/ssh-verify-attestation/ |
| H A D | ssh-verify-attestation.c | 110 "authdata len=%zu challenge len=%zu", sshbuf_len(attestation_cert), in prepare_fido_cred() 111 sshbuf_len(sig), sshbuf_len(authdata), sshbuf_len(challenge)); in prepare_fido_cred() 116 sshbuf_len(challenge)); in prepare_fido_cred() 119 sshbuf_len(authdata)); in prepare_fido_cred() 122 sshbuf_len(attestation_cert)); in prepare_fido_cred() 123 fido_cred_set_sig(cred, sshbuf_ptr(sig), sshbuf_len(sig)); in prepare_fido_cred() 427 sshbuf_ptr(attestation_cert), sshbuf_len(attestation_cert)); in main()
|
| /freebsd/crypto/openssh/regress/unittests/crypto/ |
| H A D | test_mldsa_eddsa.c | 112 ASSERT_INT_EQ(sshbuf_len(b_pk), MLDSA44_ED25519_PK_SZ); in mldsa_eddsa_tests() 113 ASSERT_INT_EQ(sshbuf_len(b_sk), MLDSA44_ED25519_SK_SZ); in mldsa_eddsa_tests() 114 ASSERT_INT_EQ(sshbuf_len(b_s), MLDSA44_ED25519_SIG_SZ); in mldsa_eddsa_tests() 115 ASSERT_INT_EQ(sshbuf_len(b_sWithContext), MLDSA44_ED25519_SIG_SZ); in mldsa_eddsa_tests() 119 tvec_m_len = sshbuf_len(b_m); in mldsa_eddsa_tests() 121 tvec_ctx_len = sshbuf_len(b_ctx); in mldsa_eddsa_tests()
|
| /freebsd/crypto/openssh/regress/unittests/sshkey/ |
| H A D | test_fuzz.c | 63 fuzz = fuzz_begin(fuzzers, sshbuf_mutable_ptr(buf), sshbuf_len(buf)); in public_fuzz() 64 ASSERT_INT_EQ(sshkey_from_blob(sshbuf_ptr(buf), sshbuf_len(buf), in public_fuzz() 122 sshbuf_len(buf)); in sshkey_fuzz_tests() 144 sshbuf_len(buf)); in sshkey_fuzz_tests() 167 sshbuf_len(buf)); in sshkey_fuzz_tests() 189 sshbuf_len(buf)); in sshkey_fuzz_tests() 213 sshbuf_len(buf)); in sshkey_fuzz_tests() 236 sshbuf_len(buf)); in sshkey_fuzz_tests()
|
| /freebsd/crypto/openssh/regress/misc/fuzz-harness/ |
| H A D | kex_fuzz.cc | 84 sshbuf_len(ts->sin))) != 0) { in run_kex() 92 sshbuf_len(ts->cin))) != 0) { in run_kex() 198 sshbuf_len(ts->cin)); in do_kex_with_key() 201 sshbuf_len(ts->sin)); in do_kex_with_key() 355 sshbuf_len(ts->smsgs), f) != sshbuf_len(ts->smsgs)) in main() 366 sshbuf_len(ts->cmsgs), f) != sshbuf_len(ts->cmsgs)) in main()
|