summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--bufaux.c9
-rw-r--r--bufaux.h7
-rw-r--r--packet.c6
4 files changed, 13 insertions, 14 deletions
diff --git a/ChangeLog b/ChangeLog
index ce8664d9c..366e803a6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -63,6 +63,9 @@
63 - markus@cvs.openbsd.org 2001/12/28 13:57:33 63 - markus@cvs.openbsd.org 2001/12/28 13:57:33
64 [auth1.c kexdh.c kexgex.c packet.c packet.h sshconnect1.c sshd.c] 64 [auth1.c kexdh.c kexgex.c packet.c packet.h sshconnect1.c sshd.c]
65 packet_get_bignum* no longer returns a size 65 packet_get_bignum* no longer returns a size
66 - markus@cvs.openbsd.org 2001/12/28 14:13:13
67 [bufaux.c bufaux.h packet.c]
68 buffer_get_bignum: int -> void
66 69
67 70
6820020121 7120020121
@@ -7211,4 +7214,4 @@
7211 - Wrote replacements for strlcpy and mkdtemp 7214 - Wrote replacements for strlcpy and mkdtemp
7212 - Released 1.0pre1 7215 - Released 1.0pre1
7213 7216
7214$Id: ChangeLog,v 1.1741 2002/01/22 12:14:44 djm Exp $ 7217$Id: ChangeLog,v 1.1742 2002/01/22 12:15:57 djm Exp $
diff --git a/bufaux.c b/bufaux.c
index 7fbd0d02e..9f0ab6b17 100644
--- a/bufaux.c
+++ b/bufaux.c
@@ -37,7 +37,7 @@
37 */ 37 */
38 38
39#include "includes.h" 39#include "includes.h"
40RCSID("$OpenBSD: bufaux.c,v 1.20 2001/12/19 17:16:13 stevesk Exp $"); 40RCSID("$OpenBSD: bufaux.c,v 1.21 2001/12/28 14:13:13 markus Exp $");
41 41
42#include <openssl/bn.h> 42#include <openssl/bn.h>
43#include "bufaux.h" 43#include "bufaux.h"
@@ -77,7 +77,7 @@ buffer_put_bignum(Buffer *buffer, BIGNUM *value)
77/* 77/*
78 * Retrieves an BIGNUM from the buffer. 78 * Retrieves an BIGNUM from the buffer.
79 */ 79 */
80int 80void
81buffer_get_bignum(Buffer *buffer, BIGNUM *value) 81buffer_get_bignum(Buffer *buffer, BIGNUM *value)
82{ 82{
83 int bits, bytes; 83 int bits, bytes;
@@ -93,8 +93,6 @@ buffer_get_bignum(Buffer *buffer, BIGNUM *value)
93 bin = (u_char *) buffer_ptr(buffer); 93 bin = (u_char *) buffer_ptr(buffer);
94 BN_bin2bn(bin, bytes, value); 94 BN_bin2bn(bin, bytes, value);
95 buffer_consume(buffer, bytes); 95 buffer_consume(buffer, bytes);
96
97 return 2 + bytes;
98} 96}
99 97
100/* 98/*
@@ -130,7 +128,7 @@ buffer_put_bignum2(Buffer *buffer, BIGNUM *value)
130 xfree(buf); 128 xfree(buf);
131} 129}
132 130
133int 131void
134buffer_get_bignum2(Buffer *buffer, BIGNUM *value) 132buffer_get_bignum2(Buffer *buffer, BIGNUM *value)
135{ 133{
136 /**XXX should be two's-complement */ 134 /**XXX should be two's-complement */
@@ -138,7 +136,6 @@ buffer_get_bignum2(Buffer *buffer, BIGNUM *value)
138 u_char *bin = (u_char *)buffer_get_string(buffer, (u_int *)&len); 136 u_char *bin = (u_char *)buffer_get_string(buffer, (u_int *)&len);
139 BN_bin2bn(bin, len, value); 137 BN_bin2bn(bin, len, value);
140 xfree(bin); 138 xfree(bin);
141 return len;
142} 139}
143 140
144/* 141/*
diff --git a/bufaux.h b/bufaux.h
index 521ddf135..a5bbd6f4b 100644
--- a/bufaux.h
+++ b/bufaux.h
@@ -10,7 +10,7 @@
10 * called by a name other than "ssh" or "Secure Shell". 10 * called by a name other than "ssh" or "Secure Shell".
11 */ 11 */
12 12
13/* RCSID("$OpenBSD: bufaux.h,v 1.14 2001/12/19 17:16:13 stevesk Exp $"); */ 13/* RCSID("$OpenBSD: bufaux.h,v 1.15 2001/12/28 14:13:13 markus Exp $"); */
14 14
15#ifndef BUFAUX_H 15#ifndef BUFAUX_H
16#define BUFAUX_H 16#define BUFAUX_H
@@ -20,9 +20,8 @@
20 20
21void buffer_put_bignum(Buffer *, BIGNUM *); 21void buffer_put_bignum(Buffer *, BIGNUM *);
22void buffer_put_bignum2(Buffer *, BIGNUM *); 22void buffer_put_bignum2(Buffer *, BIGNUM *);
23 23void buffer_get_bignum(Buffer *, BIGNUM *);
24int buffer_get_bignum(Buffer *, BIGNUM *); 24void buffer_get_bignum2(Buffer *, BIGNUM *);
25int buffer_get_bignum2(Buffer *, BIGNUM *);
26 25
27u_int buffer_get_int(Buffer *); 26u_int buffer_get_int(Buffer *);
28void buffer_put_int(Buffer *, u_int); 27void buffer_put_int(Buffer *, u_int);
diff --git a/packet.c b/packet.c
index 065f8a52a..593fb707c 100644
--- a/packet.c
+++ b/packet.c
@@ -37,7 +37,7 @@
37 */ 37 */
38 38
39#include "includes.h" 39#include "includes.h"
40RCSID("$OpenBSD: packet.c,v 1.80 2001/12/28 13:57:33 markus Exp $"); 40RCSID("$OpenBSD: packet.c,v 1.81 2001/12/28 14:13:13 markus Exp $");
41 41
42#include "xmalloc.h" 42#include "xmalloc.h"
43#include "buffer.h" 43#include "buffer.h"
@@ -1002,13 +1002,13 @@ packet_get_int(void)
1002void 1002void
1003packet_get_bignum(BIGNUM * value) 1003packet_get_bignum(BIGNUM * value)
1004{ 1004{
1005 (void)buffer_get_bignum(&incoming_packet, value); 1005 buffer_get_bignum(&incoming_packet, value);
1006} 1006}
1007 1007
1008void 1008void
1009packet_get_bignum2(BIGNUM * value) 1009packet_get_bignum2(BIGNUM * value)
1010{ 1010{
1011 (void)buffer_get_bignum2(&incoming_packet, value); 1011 buffer_get_bignum2(&incoming_packet, value);
1012} 1012}
1013 1013
1014void * 1014void *