version 1.4, 2006/11/06 21:25:28 |
version 1.5, 2007/02/14 14:32:00 |
|
|
} |
} |
|
|
/* |
/* |
* Retrieves an BIGNUM from the buffer. |
* Retrieves a BIGNUM from the buffer. |
*/ |
*/ |
int |
int |
buffer_get_bignum_ret(Buffer *buffer, BIGNUM *value) |
buffer_get_bignum_ret(Buffer *buffer, BIGNUM *value) |
|
|
u_int bits, bytes; |
u_int bits, bytes; |
u_char buf[2], *bin; |
u_char buf[2], *bin; |
|
|
/* Get the number for bits. */ |
/* Get the number of bits. */ |
if (buffer_get_ret(buffer, (char *) buf, 2) == -1) { |
if (buffer_get_ret(buffer, (char *) buf, 2) == -1) { |
error("buffer_get_bignum_ret: invalid length"); |
error("buffer_get_bignum_ret: invalid length"); |
return (-1); |
return (-1); |
|
|
} |
} |
|
|
/* |
/* |
* Stores an BIGNUM in the buffer in SSH2 format. |
* Stores a BIGNUM in the buffer in SSH2 format. |
*/ |
*/ |
int |
int |
buffer_put_bignum2_ret(Buffer *buffer, const BIGNUM *value) |
buffer_put_bignum2_ret(Buffer *buffer, const BIGNUM *value) |