Lines Matching refs:len_bytes
53 size_t len_bytes; in sshbuf_get_bignum1() local
59 len_bytes = (len_bits + 7) >> 3; in sshbuf_get_bignum1()
60 if (len_bytes > SSHBUF_MAX_BIGNUM) in sshbuf_get_bignum1()
62 if (sshbuf_len(buf) < 2 + len_bytes) in sshbuf_get_bignum1()
64 if (v != NULL && BN_bin2bn(d + 2, len_bytes, v) == NULL) in sshbuf_get_bignum1()
66 if (sshbuf_consume(buf, 2 + len_bytes) != 0) { in sshbuf_get_bignum1()
172 size_t len_bytes = (len_bits + 7) / 8; in sshbuf_put_bignum1() local
175 if (len_bits < 0 || len_bytes > SSHBUF_MAX_BIGNUM) in sshbuf_put_bignum1()
177 if (BN_bn2bin(v, d) != (int)len_bytes) in sshbuf_put_bignum1()
179 if ((r = sshbuf_reserve(buf, len_bytes + 2, &dp)) < 0) { in sshbuf_put_bignum1()
184 if (len_bytes != 0) in sshbuf_put_bignum1()
185 memcpy(dp + 2, d, len_bytes); in sshbuf_put_bignum1()