[bufaux.c bufaux.h packet.c]
     buffer_get_bignum: int -> void
This commit is contained in:
Damien Miller 2002-01-22 23:15:57 +11:00
parent d432ccf740
commit 76e1e368b5
4 changed files with 13 additions and 14 deletions

View File

@ -63,6 +63,9 @@
- markus@cvs.openbsd.org 2001/12/28 13:57:33
[auth1.c kexdh.c kexgex.c packet.c packet.h sshconnect1.c sshd.c]
packet_get_bignum* no longer returns a size
- markus@cvs.openbsd.org 2001/12/28 14:13:13
[bufaux.c bufaux.h packet.c]
buffer_get_bignum: int -> void
20020121
@ -7211,4 +7214,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
$Id: ChangeLog,v 1.1741 2002/01/22 12:14:44 djm Exp $
$Id: ChangeLog,v 1.1742 2002/01/22 12:15:57 djm Exp $

View File

@ -37,7 +37,7 @@
*/
#include "includes.h"
RCSID("$OpenBSD: bufaux.c,v 1.20 2001/12/19 17:16:13 stevesk Exp $");
RCSID("$OpenBSD: bufaux.c,v 1.21 2001/12/28 14:13:13 markus Exp $");
#include <openssl/bn.h>
#include "bufaux.h"
@ -77,7 +77,7 @@ buffer_put_bignum(Buffer *buffer, BIGNUM *value)
/*
* Retrieves an BIGNUM from the buffer.
*/
int
void
buffer_get_bignum(Buffer *buffer, BIGNUM *value)
{
int bits, bytes;
@ -93,8 +93,6 @@ buffer_get_bignum(Buffer *buffer, BIGNUM *value)
bin = (u_char *) buffer_ptr(buffer);
BN_bin2bn(bin, bytes, value);
buffer_consume(buffer, bytes);
return 2 + bytes;
}
/*
@ -130,7 +128,7 @@ buffer_put_bignum2(Buffer *buffer, BIGNUM *value)
xfree(buf);
}
int
void
buffer_get_bignum2(Buffer *buffer, BIGNUM *value)
{
/**XXX should be two's-complement */
@ -138,7 +136,6 @@ buffer_get_bignum2(Buffer *buffer, BIGNUM *value)
u_char *bin = (u_char *)buffer_get_string(buffer, (u_int *)&len);
BN_bin2bn(bin, len, value);
xfree(bin);
return len;
}
/*

View File

@ -10,7 +10,7 @@
* called by a name other than "ssh" or "Secure Shell".
*/
/* RCSID("$OpenBSD: bufaux.h,v 1.14 2001/12/19 17:16:13 stevesk Exp $"); */
/* RCSID("$OpenBSD: bufaux.h,v 1.15 2001/12/28 14:13:13 markus Exp $"); */
#ifndef BUFAUX_H
#define BUFAUX_H
@ -20,9 +20,8 @@
void buffer_put_bignum(Buffer *, BIGNUM *);
void buffer_put_bignum2(Buffer *, BIGNUM *);
int buffer_get_bignum(Buffer *, BIGNUM *);
int buffer_get_bignum2(Buffer *, BIGNUM *);
void buffer_get_bignum(Buffer *, BIGNUM *);
void buffer_get_bignum2(Buffer *, BIGNUM *);
u_int buffer_get_int(Buffer *);
void buffer_put_int(Buffer *, u_int);

View File

@ -37,7 +37,7 @@
*/
#include "includes.h"
RCSID("$OpenBSD: packet.c,v 1.80 2001/12/28 13:57:33 markus Exp $");
RCSID("$OpenBSD: packet.c,v 1.81 2001/12/28 14:13:13 markus Exp $");
#include "xmalloc.h"
#include "buffer.h"
@ -1002,13 +1002,13 @@ packet_get_int(void)
void
packet_get_bignum(BIGNUM * value)
{
(void)buffer_get_bignum(&incoming_packet, value);
buffer_get_bignum(&incoming_packet, value);
}
void
packet_get_bignum2(BIGNUM * value)
{
(void)buffer_get_bignum2(&incoming_packet, value);
buffer_get_bignum2(&incoming_packet, value);
}
void *