Home | History | Annotate | Download | only in openssh

Lines Matching refs:buffer

50 #include "buffer.h"
55 * Stores an BIGNUM in the buffer with a 2-byte msb first bit count, followed
59 buffer_put_bignum_ret(Buffer *buffer, const BIGNUM *value)
76 /* Store the number of bits in the buffer in two bytes, msb first. */
78 buffer_append(buffer, msg, 2);
80 buffer_append(buffer, buf, oi);
89 buffer_put_bignum(Buffer *buffer, const BIGNUM *value)
91 if (buffer_put_bignum_ret(buffer, value) == -1)
92 fatal("buffer_put_bignum: buffer error");
96 * Retrieves a BIGNUM from the buffer.
99 buffer_get_bignum_ret(Buffer *buffer, BIGNUM *value)
105 if (buffer_get_ret(buffer, (char *) buf, 2) == -1) {
116 if (buffer_len(buffer) < bytes) {
117 error("buffer_get_bignum_ret: input buffer too small");
120 bin = buffer_ptr(buffer);
125 if (buffer_consume_ret(buffer, bytes) == -1) {
133 buffer_get_bignum(Buffer *buffer, BIGNUM *value)
135 if (buffer_get_bignum_ret(buffer, value) == -1)
136 fatal("buffer_get_bignum: buffer error");
140 * Stores a BIGNUM in the buffer in SSH2 format.
143 buffer_put_bignum2_ret(Buffer *buffer, const BIGNUM *value)
151 buffer_put_int(buffer, 0);
174 buffer_put_string(buffer, buf+hasnohigh, bytes-hasnohigh);
181 buffer_put_bignum2(Buffer *buffer, const BIGNUM *value)
183 if (buffer_put_bignum2_ret(buffer, value) == -1)
184 fatal("buffer_put_bignum2: buffer error");
188 buffer_get_bignum2_ret(Buffer *buffer, BIGNUM *value)
193 if ((bin = buffer_get_string_ret(buffer, &len)) == NULL) {
219 buffer_get_bignum2(Buffer *buffer, BIGNUM *value)
221 if (buffer_get_bignum2_ret(buffer, value) == -1)
222 fatal("buffer_get_bignum2: buffer error");