sshbuf_put_u32
ASSERT_INT_EQ(sshbuf_put_u32(p1, 0xdeadbeef), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x01020304), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, 0xfeedface), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x12345678), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x12345678), SSH_ERR_BUFFER_READ_ONLY);
ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x11223344), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x11223344), 0);
r = sshbuf_put_u32(p1, 0x11223344);
ASSERT_INT_EQ(sshbuf_put_u32(p1, sizeof(x)), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, sizeof(x)), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, sizeof(x)), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, sizeof(x)), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, 0xffffffff), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, 0xffffffff), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, sizeof(x)), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, sizeof(x) - 1), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, BN_num_bytes(bn)), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, BN_num_bytes(bn)), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, 65536), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, BN_num_bytes(bn) + 1), 0); /* MSB */
ASSERT_INT_EQ(sshbuf_put_u32(p1, BN_num_bytes(bn) + 1), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, BN_num_bytes(bn)), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x12345678), 0);
ASSERT_INT_EQ(sshbuf_put_u32(p1, 0x12345678), 0);
ASSERT_INT_EQ(sshbuf_put_u32(b, SSH2_CERT_TYPE_USER), 0); /* type */
if ((r = sshbuf_put_u32(m, n)) != 0 ||
(r = sshbuf_put_u32(m, (opts->force_tun_device < 0) ?
(r = sshbuf_put_u32(msg, flags)) != 0)
(r = sshbuf_put_u32(m, life)) != 0)
(r = sshbuf_put_u32(output, ntohl(INADDR_ANY))) != 0) /* ignored */
(r = sshbuf_put_u32(output, ntohl(INADDR_ANY))) != 0 || /* addr */
(r = sshbuf_put_u32(modified, c->self)) != 0 ||
if ((r = sshbuf_put_u32(modified, remote_id)) != 0 ||
(r = sshbuf_put_u32(modified, c->self)) != 0 ||
(r = sshbuf_put_u32(b, c->mux_downstream_id)) != 0 ||
(r = sshbuf_put_u32(b, rchan)) != 0 ||
(r = sshbuf_put_u32(b, rwindow)) != 0 ||
(r = sshbuf_put_u32(b, rmaxpack)) != 0 ||
(r = sshbuf_put_u32(b, listen_port)) != 0 ||
(r = sshbuf_put_u32(b, originator_port)) != 0 ||
(r = sshbuf_put_u32(b, 0)) != 0) /* uint32 reserved */
if ((r = sshbuf_put_u32(m, 4)) != 0 ||
if ((r = sshbuf_put_u32(m, 1)) != 0 ||
(r = sshbuf_put_u32(b, sshbuf_len(client_kexinit) + 1)) != 0 ||
(r = sshbuf_put_u32(b, sshbuf_len(server_kexinit) + 1)) != 0 ||
(r = sshbuf_put_u32(b, sshbuf_len(client_kexinit) + 1)) != 0 ||
(r = sshbuf_put_u32(b, sshbuf_len(server_kexinit) + 1)) != 0 ||
(min != -1 && (r = sshbuf_put_u32(b, min)) != 0) ||
(r = sshbuf_put_u32(b, wantbits)) != 0 ||
(max != -1 && (r = sshbuf_put_u32(b, max)) != 0) ||
(r = sshbuf_put_u32(buf, KRL_FORMAT_VERSION)) != 0 ||
if ((r = sshbuf_put_u32(m, authok)) != 0)
if ((r = sshbuf_put_u32(m, allowed)) != 0)
if ((r = sshbuf_put_u32(m, encoded_ret)) != 0 ||
if ((r = sshbuf_put_u32(m, sig_details->sk_counter)) != 0 ||
if ((r = sshbuf_put_u32(m, 1)) != 0 ||
if ((r = sshbuf_put_u32(m, 0)) != 0)
if ((r = sshbuf_put_u32(m, major)) != 0)
if ((r = sshbuf_put_u32(m, major)) != 0 ||
(r = sshbuf_put_u32(m, flags)) != 0)
if ((r = sshbuf_put_u32(m, ret)) != 0)
if ((r = sshbuf_put_u32(m, authenticated)) != 0)
if ((r = sshbuf_put_u32(m, authenticated)) != 0)
if ((r = sshbuf_put_u32(m, success)) != 0)
if ((r = sshbuf_put_u32(m, min)) != 0 ||
(r = sshbuf_put_u32(m, nbits)) != 0 ||
(r = sshbuf_put_u32(m, max)) != 0)
if ((r = sshbuf_put_u32(m, ssh->compat)) != 0)
(r = sshbuf_put_u32(m, compat)) != 0)
if ((r = sshbuf_put_u32(m, type)) != 0 ||
(r = sshbuf_put_u32(m, pubkey_auth_attempt)) != 0)
if ((r = sshbuf_put_u32(log_msg, 0)) != 0 || /* length; filled below */
(r = sshbuf_put_u32(log_msg, level)) != 0 ||
(r = sshbuf_put_u32(log_msg, forced)) != 0 ||
if ((r = sshbuf_put_u32(reply, MUX_S_SESSION_OPENED)) != 0 ||
(r = sshbuf_put_u32(reply, cctx->rid)) != 0 ||
(r = sshbuf_put_u32(reply, c->self)) != 0)
if ((r = sshbuf_put_u32(reply, MUX_S_PROXY)) != 0 ||
(r = sshbuf_put_u32(reply, rid)) != 0)
if ((r = sshbuf_put_u32(out, MUX_MSG_HELLO)) != 0 ||
(r = sshbuf_put_u32(out, SSHMUX_VER)) != 0)
if ((r = sshbuf_put_u32(m, MUX_S_EXIT_MESSAGE)) != 0 ||
(r = sshbuf_put_u32(m, c->self)) != 0 ||
(r = sshbuf_put_u32(m, exitval)) != 0 ||
if ((r = sshbuf_put_u32(m, MUX_S_TTY_ALLOC_FAIL)) != 0 ||
(r = sshbuf_put_u32(m, c->self)) != 0 ||
if ((r = sshbuf_put_u32(reply, MUX_S_SESSION_OPENED)) != 0 ||
(r = sshbuf_put_u32(reply, cctx->rid)) != 0 ||
(r = sshbuf_put_u32(reply, c->self)) != 0)
if ((r = sshbuf_put_u32(m, MUX_MSG_HELLO)) != 0 ||
(r = sshbuf_put_u32(m, SSHMUX_VER)) != 0)
if ((r = sshbuf_put_u32(m, MUX_C_ALIVE_CHECK)) != 0 ||
(r = sshbuf_put_u32(m, muxclient_request_id)) != 0)
if ((r = sshbuf_put_u32(m, MUX_C_EXT_INFO)) != 0 ||
(r = sshbuf_put_u32(m, muxclient_request_id)) != 0 ||
if ((r = sshbuf_put_u32(m, MUX_C_TERMINATE)) != 0 ||
(r = sshbuf_put_u32(m, muxclient_request_id)) != 0)
if ((r = sshbuf_put_u32(m, type)) != 0 ||
(r = sshbuf_put_u32(m, muxclient_request_id)) != 0 ||
(r = sshbuf_put_u32(m, ftype)) != 0 ||
(r = sshbuf_put_u32(m, fwd->listen_port)) != 0 ||
(r = sshbuf_put_u32(m, fwd->connect_port)) != 0)
if ((r = sshbuf_put_u32(m, MUX_C_NEW_SESSION)) != 0 ||
(r = sshbuf_put_u32(m, muxclient_request_id)) != 0 ||
(r = sshbuf_put_u32(m, tty_flag)) != 0 ||
(r = sshbuf_put_u32(m, options.forward_x11)) != 0 ||
(r = sshbuf_put_u32(m, options.forward_agent)) != 0 ||
(r = sshbuf_put_u32(m, options.session_type == SESSION_TYPE_SUBSYSTEM)) != 0 ||
(r = sshbuf_put_u32(m, echar)) != 0 ||
if ((r = sshbuf_put_u32(m, MUX_C_PROXY)) != 0 ||
(r = sshbuf_put_u32(m, muxclient_request_id)) != 0)
if ((r = sshbuf_put_u32(m, MUX_C_NEW_STDIO_FWD)) != 0 ||
(r = sshbuf_put_u32(m, muxclient_request_id)) != 0 ||
(r = sshbuf_put_u32(m, options.stdio_forward_port)) != 0)
if ((r = sshbuf_put_u32(m, MUX_C_STOP_LISTENING)) != 0 ||
(r = sshbuf_put_u32(m, muxclient_request_id)) != 0)
if ((r = sshbuf_put_u32(reply, MUX_S_OK)) != 0 ||
(r = sshbuf_put_u32(reply, rid)) != 0)
if ((r = sshbuf_put_u32(reply, type)) != 0 ||
(r = sshbuf_put_u32(reply, rid)) != 0 ||
if ((r = sshbuf_put_u32(reply, MUX_S_ALIVE)) != 0 ||
(r = sshbuf_put_u32(reply, rid)) != 0 ||
(r = sshbuf_put_u32(reply, (u_int)getpid())) != 0)
if ((r = sshbuf_put_u32(reply, MUX_S_EXT_INFO)) != 0 ||
(r = sshbuf_put_u32(reply, rid)) != 0 ||
(r = sshbuf_put_u32(reply, status)) != 0 ||
if ((r = sshbuf_put_u32(out,
(r = sshbuf_put_u32(out, fctx->rid)) != 0 ||
(r = sshbuf_put_u32(out,
if ((r = sshbuf_put_u32(reply,
(r = sshbuf_put_u32(reply, rid)) != 0 ||
(r = sshbuf_put_u32(reply,
if ((r = sshbuf_put_u32(m, kex->we_need)) != 0 ||
(r = sshbuf_put_u32(m, kex->hostkey_type)) != 0 ||
(r = sshbuf_put_u32(m, kex->hostkey_nid)) != 0 ||
(r = sshbuf_put_u32(m, kex->kex_type)) != 0 ||
(r = sshbuf_put_u32(m, kex->kex_strict)) != 0 ||
(r = sshbuf_put_u32(m, kex->flags)) != 0)
(r = sshbuf_put_u32(b, enc->enabled)) != 0 ||
(r = sshbuf_put_u32(b, enc->block_size)) != 0 ||
(r = sshbuf_put_u32(b, mac->enabled)) != 0 ||
if ((r = sshbuf_put_u32(b, comp->type)) != 0 ||
(r = sshbuf_put_u32(m, state->rekey_interval)) != 0 ||
(r = sshbuf_put_u32(m, state->p_send.seqnr)) != 0 ||
(r = sshbuf_put_u32(m, state->p_send.packets)) != 0 ||
(r = sshbuf_put_u32(m, state->p_read.seqnr)) != 0 ||
(r = sshbuf_put_u32(m, state->p_read.packets)) != 0 ||
(r = sshbuf_put_u32(m, ENCODE_INT(state->interactive_mode))) != 0 ||
(r = sshbuf_put_u32(m, ENCODE_INT(state->qos_interactive))) != 0 ||
(r = sshbuf_put_u32(m, ENCODE_INT(state->qos_other))) != 0)
return sshbuf_put_u32(ssh->state->outgoing_packet, val);
(r = sshbuf_put_u32(buf, uv)) != 0)
if ((r = sshbuf_put_u32(buf, n)) != 0)
if ((r = sshbuf_put_u32(buf, options->num_host_key_files)) != 0) {
if ((r = sshbuf_put_u32(buf, options->num_queued_listens)) != 0) {
if ((r = sshbuf_put_u32(buf, options->num_ports)) != 0) {
if ((r = sshbuf_put_u32(buf, options->num_subsystems)) != 0) {
if ((r = sshbuf_put_u32(buf, SSHD_CONFIG_BLOB_VERSION)) != 0) {
(r = sshbuf_put_u32(resp, allocated_listen_port)) != 0)
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, SSH2_FXF_READ)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, SSH2_FXF_WRITE|SSH2_FXF_CREAT|
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0)
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, len)) != 0)
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, openmode)) != 0 ||
(r = sshbuf_put_u32(msg, ack->id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, to->msg_id++)) != 0 ||
if ((r = sshbuf_put_u32(uidbuf, uids[i])) != 0)
if ((r = sshbuf_put_u32(gidbuf, gids[i])) != 0)
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, SSH2_FILEXFER_VERSION)) != 0)
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
if ((r = sshbuf_put_u32(b, a->flags)) != 0)
if ((r = sshbuf_put_u32(b, a->uid)) != 0 ||
(r = sshbuf_put_u32(b, a->gid)) != 0)
if ((r = sshbuf_put_u32(b, a->perm)) != 0)
if ((r = sshbuf_put_u32(b, a->atime)) != 0 ||
(r = sshbuf_put_u32(b, a->mtime)) != 0)
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, status)) != 0)
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, count)) != 0)
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, id)) != 0 ||
(r = sshbuf_put_u32(msg, SSH2_FILEXFER_VERSION)) != 0)
(r = sshbuf_put_u32(msg, 0)) != 0 ||
if ((r = sshbuf_put_u32(e->output, 1)) != 0 ||
(r = sshbuf_put_u32(msg, nentries)) != 0 ||
(ret = sshbuf_put_u32(original_signed, sig_counter)) != 0 ||
sshbuf_put_u32(encoded, sig_counter) != 0 ||
(r = sshbuf_put_u32(msg, compat)) != 0)
(r = sshbuf_put_u32(msg, nkeys)) != 0)
(r = sshbuf_put_u32(msg, -nkeys)) != 0)
if ((r = sshbuf_put_u32(req, type)) != 0 ||
(r = sshbuf_put_u32(req, ll < 0 ? 0 : ll)) != 0 ||
(r = sshbuf_put_u32(req, compat)) != 0 ||
if ((r = sshbuf_put_u32(req, (u_int)type)) != 0 ||
(r = sshbuf_put_u32(req, flags)) != 0) {
if ((r = sshbuf_put_u32(resp, SSH_SK_HELPER_SIGN)) != 0 ||
if ((r = sshbuf_put_u32(resp, SSH_SK_HELPER_ENROLL)) != 0 ||
if ((r = sshbuf_put_u32(resp, SSH_SK_HELPER_LOAD_RESIDENT)) != 0)
if (sshbuf_put_u32(resp, SSH_SK_HELPER_ERROR) != 0 ||
sshbuf_put_u32(resp, (u_int)-r) != 0)
(r = sshbuf_put_u32(attest, 0)) != 0 || /* resvd flags */
(r = sshbuf_put_u32(sig, resp->counter)) != 0) {
(r = sshbuf_put_u32(sig, resp->counter)) != 0) {
int sshbuf_put_u32(struct sshbuf *buf, uint32_t val);
if ((r = sshbuf_put_u32(b, sock)) != 0 ||
if ((r = sshbuf_put_u32(m, 0)) != 0 ||
if ((r = sshbuf_put_u32(m, 0)) != 0 ||
(ret = sshbuf_put_u32(cert, k->cert->type)) != 0 ||
(r = sshbuf_put_u32(kdf, rounds)) != 0)
(r = sshbuf_put_u32(encoded, 1)) != 0 || /* number of keys */
if ((r = sshbuf_put_u32(encrypted, check)) != 0 ||
(r = sshbuf_put_u32(encrypted, check)) != 0)
if ((r = sshbuf_put_u32(encoded, sshbuf_len(encrypted))) != 0)
(r = sshbuf_put_u32(blob, SIG_VERSION)) != 0 ||
(r = sshbuf_put_u32(buf, obaud)) != 0 ||
(r = sshbuf_put_u32(buf, ibaud)) != 0)
(r = sshbuf_put_u32(buf, tio.c_cc[NAME])) != 0) \
(r = sshbuf_put_u32(buf, ((tio.FIELD & NAME) != 0))) != 0) \