Home
last modified time | relevance | path

Searched refs:sshbuf_len (Results 1 – 25 of 60) sorted by relevance

123

/dflybsd-src/crypto/openssh/
H A Dsshbuf-misc.c69 fprintf(f, "buffer len = %zu\n", sshbuf_len(buf)); in sshbuf_dump()
70 sshbuf_dump_data(sshbuf_ptr(buf), sshbuf_len(buf), f); in sshbuf_dump()
76 size_t i, j, len = sshbuf_len(buf); in sshbuf_dtob16()
100 if (d == NULL || b64 == NULL || sshbuf_len(d) >= SIZE_MAX / 2) in sshbuf_dtob64()
102 if (sshbuf_len(d) == 0) in sshbuf_dtob64()
104 slen = ((sshbuf_len(d) + 2) / 3) * 4 + 1; in sshbuf_dtob64()
107 if (b64_ntop(sshbuf_ptr(d), sshbuf_len(d), s, slen) == -1) { in sshbuf_dtob64()
186 l = sshbuf_len(b); in sshbuf_dtourlb64()
197 l = sshbuf_len(b); in sshbuf_dtourlb64()
218 size_t l = sshbuf_len(buf); in sshbuf_dup_string()
[all …]
H A Dssh_api.c264 if (sshbuf_len(ssh->kex->client_version) == 0 || in ssh_packet_next()
265 sshbuf_len(ssh->kex->server_version) == 0) in ssh_packet_next()
316 *len = sshbuf_len(output); in ssh_output_ptr()
354 if (j >= sshbuf_len(input)) in _ssh_read_banner()
367 if (sshbuf_len(banner) > SSH_MAX_BANNER_LEN) in _ssh_read_banner()
370 if (sshbuf_len(banner) >= 4 && in _ssh_read_banner()
373 debug_f("%.*s", (int)sshbuf_len(banner), in _ssh_read_banner()
389 (remote_version = calloc(1, sshbuf_len(banner))) == NULL) { in _ssh_read_banner()
455 if (sshbuf_len(ssh->kex->server_version) == 0) in _ssh_exchange_banner()
458 sshbuf_len(ssh->kex->server_version) != 0 && in _ssh_exchange_banner()
[all …]
H A Dkexsntrup761x25519.c91 if (sshbuf_len(client_blob) != need) { 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()
173 if (sshbuf_len(server_blob) != need) { 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 Dsshbuf-io.c60 if (sshbuf_len(blob) > SSHBUF_SIZE_MAX) { in sshbuf_load_fd()
66 st.st_size != (off_t)sshbuf_len(blob)) { in sshbuf_load_fd()
108 sshbuf_len(buf)) != sshbuf_len(buf) || close(fd) != 0) { in sshbuf_write_file()
H A Dpacket.c391 while (sshbuf_len(state->incoming_packet) < dlen) in ssh_packet_stop_discard()
425 if (sshbuf_len(state->input) >= discard) in ssh_packet_start_discard()
427 state->packet_discard = discard - sshbuf_len(state->input); in ssh_packet_start_discard()
833 if (sshbuf_len(in) == 0) in compress_buffer()
840 ssh->state->compression_out_stream.avail_in = sshbuf_len(in); in compress_buffer()
881 ssh->state->compression_in_stream.avail_in = sshbuf_len(in); in uncompress_buffer()
1196 len = sshbuf_len(state->outgoing_packet); in ssh_packet_send2_wrapped()
1211 sshbuf_len(state->outgoing_packet))); in ssh_packet_send2_wrapped()
1215 len = sshbuf_len(state->outgoing_packet); in ssh_packet_send2_wrapped()
1256 len = sshbuf_len(state->outgoing_packet); in ssh_packet_send2_wrapped()
[all …]
H A Dkexc25519.c127 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 Dkrl.c718 if (sshbuf_len(sect) != 0) { in revoked_certs_generate()
772 if (sshbuf_len(sect) != 0) { in ssh_krl_to_blob()
783 if (sshbuf_len(sect) != 0) { in ssh_krl_to_blob()
795 if (sshbuf_len(sect) != 0) { in ssh_krl_to_blob()
841 if (sshbuf_len(subsect) != 0) { in cert_extension_subsection()
848 name, critical, sshbuf_len(value)); in cert_extension_subsection()
887 while (sshbuf_len(buf) > 0) { in parse_revoked_certs()
898 while (sshbuf_len(subsect) > 0) { in parse_revoked_certs()
944 while (sshbuf_len(subsect) > 0) { in parse_revoked_certs()
964 if (sshbuf_len(subsect) > 0) { in parse_revoked_certs()
[all …]
H A Dnchan.c132 if (sshbuf_len(c->input)) { in chan_ibuf_empty()
154 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 Dssh-pkcs11-helper.c263 buf_len = sshbuf_len(iqueue); in process()
296 if (buf_len < sshbuf_len(iqueue)) { in process()
300 consumed = buf_len - sshbuf_len(iqueue); in process()
378 if (sshbuf_len(oqueue) > 0) in main()
402 sshbuf_len(oqueue)); in main()
H A Dsshkey-xmss.c355 if (sshbuf_len(b) == 0) in sshkey_xmss_deserialize_pk_info()
623 POKE_U32(buf, sshbuf_len(enc)); in sshkey_xmss_update_state()
630 if (atomicio(vwrite, fd, sshbuf_mutable_ptr(enc), sshbuf_len(enc)) != in sshkey_xmss_update_state()
631 sshbuf_len(enc)) { in sshkey_xmss_update_state()
939 while (sshbuf_len(padded) % blocksize) { in sshkey_xmss_encrypt_state()
943 encrypted_len = sshbuf_len(padded); in sshkey_xmss_encrypt_state()
948 aadlen = sshbuf_len(encoded); in sshkey_xmss_encrypt_state()
1020 if (sshbuf_len(encoded) < sizeof(XMSS_MAGIC) || in sshkey_xmss_decrypt_state()
1037 if (sshbuf_len(encoded) < authlen || in sshkey_xmss_decrypt_state()
1038 sshbuf_len(encoded) - authlen < encrypted_len) { in sshkey_xmss_decrypt_state()
[all …]
H A Dsshkey.c680 if (sshbuf_len(a->certblob) != sshbuf_len(b->certblob)) in cert_compare()
683 sshbuf_len(a->certblob)) != 0) in cert_compare()
757 if (sshbuf_len(key->cert->certblob) == 0) in to_blob_buf()
823 len = sshbuf_len(b); in to_blob()
1304 if (fwrite(sshbuf_ptr(b), sshbuf_len(b), 1, f) != 1) { in sshkey_write()
1590 while (sshbuf_len(prvbuf) % cipher_blocksize(cipher)) { in sshkey_shield_private()
1599 enclen = sshbuf_len(prvbuf); in sshkey_shield_private()
1605 sshbuf_ptr(prvbuf), sshbuf_len(prvbuf), 0, 0)) != 0) in sshkey_shield_private()
1656 while (sshbuf_len(decrypted)) { in private2_check_padding()
1791 signed_len = sshbuf_len(key->cert->certblob) - sshbuf_len(b); in cert_parse()
[all …]
H A Dmsg.c48 u_int mlen = sshbuf_len(m); in ssh_msg_send()
50 debug3_f("type %u len %zu", (unsigned int)type & 0xff, sshbuf_len(m)); in ssh_msg_send()
H A Dchannels.c884 if (sshbuf_len(c->output) > maxsize) { in channel_not_very_much_buffered_data()
886 c->self, sshbuf_len(c->output), maxsize); in channel_not_very_much_buffered_data()
1023 c->istate, sshbuf_len(c->input), in channel_format_status()
1024 c->ostate, sshbuf_len(c->output), in channel_format_status()
1025 channel_format_extended_usage(c), sshbuf_len(c->extended), in channel_format_status()
1264 sshbuf_len(c->input) < c->remote_window && in channel_pre_open()
1269 if (sshbuf_len(c->output) > 0) { in channel_pre_open()
1275 c->efd, sshbuf_len(c->extended)); in channel_pre_open()
1284 sshbuf_len(c->extended) > 0) in channel_pre_open()
1289 sshbuf_len(c->extended) < c->remote_window) in channel_pre_open()
[all …]
H A Dkexgex.c72 (r = sshbuf_put_u32(b, sshbuf_len(client_kexinit) + 1)) != 0 || in kexgex_hash()
75 (r = sshbuf_put_u32(b, sshbuf_len(server_kexinit) + 1)) != 0 || in kexgex_hash()
H A Dssh-ecdsa-sk.c189 ((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()
294 if (sshbuf_len(b) != 0) { in ssh_ecdsa_sk_verify()
305 if (sshbuf_len(sigbuf) != 0) { in ssh_ecdsa_sk_verify()
H A Dsshbuf.c149 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()
H A Dssh-agent.c709 if (sshbuf_len(sess_id) == 0) { in parse_userauth_request()
736 if (sshbuf_len(b) != 0) { in parse_userauth_request()
787 if (sshbuf_len(b) != 0) { in parse_sshsig_request()
828 if (sshbuf_len(a) != sshbuf_len(b)) in buf_equal()
830 if (timingsafe_bcmp(sshbuf_ptr(a), sshbuf_ptr(b), sshbuf_len(a)) != 0) in buf_equal()
942 sshbuf_ptr(data), sshbuf_len(data), agent_decode_alg(key, flags), in process_sign_request2()
1098 while (sshbuf_len(b) != 0) { in parse_dest_constraint_hop()
1217 while (sshbuf_len(b) != 0) { in parse_key_constraint_extension()
1245 while (sshbuf_len(b) != 0) { in parse_key_constraint_extension()
1281 while (sshbuf_len(m)) { in parse_key_constraints()
[all …]
H A Dsshbuf-getput-basic.c106 if (offset + len > sshbuf_len(buf)) { in check_offset()
250 if (sshbuf_len(buf) < 4) { in sshbuf_peek_string_direct()
259 if (sshbuf_len(buf) - 4 < len) { 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 Dsshsig.c130 if ((r = sshbuf_consume_end(sbuf, sshbuf_len(sbuf)-eoffset)) != 0) { in sshsig_dearmor()
198 sshbuf_ptr(tosign), sshbuf_len(tosign), in sshsig_wrap_sign()
205 sshbuf_ptr(tosign), sshbuf_len(tosign), in sshsig_wrap_sign()
311 debug_f("verify message length %zu", sshbuf_len(h_message)); in sshsig_wrap_verify()
344 if (sshbuf_len(signature) != 0) { in sshsig_wrap_verify()
379 sshbuf_len(toverify), NULL, 0, sig_details)) != 0) { in sshsig_wrap_verify()
862 sshbuf_len(nprincipals) != 0 ? "," : "", in cert_filter_principals()
870 if (sshbuf_len(nprincipals) == 0) { in cert_filter_principals()
H A Ddigest-openssl.c155 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 Dkex.c587 if (sshbuf_len(kex->my) < KEX_COOKIE_LEN) { in kex_send_kexinit()
589 sshbuf_len(kex->my), KEX_COOKIE_LEN); in kex_send_kexinit()
1136 if (sshbuf_len(kex->session_id) != 0) { in kex_derive_keys()
1142 } else if (sshbuf_len(kex->session_id) == 0) { in kex_derive_keys()
1266 sshbuf_len(our_version)) != sshbuf_len(our_version)) { in kex_exchange_identification()
1344 if (sshbuf_len(peer_version) > SSH_MAX_BANNER_LEN) { in kex_exchange_identification()
1350 if (sshbuf_len(peer_version) > 4 && in kex_exchange_identification()
1373 if ((remote_version = calloc(1, sshbuf_len(peer_version))) == NULL) { in kex_exchange_identification()
H A Dssh-ecdsa.c271 len = sshbuf_len(b); in ssh_ecdsa_sign()
326 if (sshbuf_len(b) != 0) { in ssh_ecdsa_verify()
347 if (sshbuf_len(sigbuf) != 0) { in ssh_ecdsa_verify()
H A Ddigest-libc.c215 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 Dttymodes.c372 while (sshbuf_len(buf) > 0) { in ssh_tty_parse_modes()
438 len = sshbuf_len(buf); in ssh_tty_parse_modes()
H A Dssh-ed25519-sk.c176 if (sshbuf_len(b) != 0) { in ssh_ed25519_sk_verify()
220 smlen = sshbuf_len(encoded); in ssh_ed25519_sk_verify()

123