diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | bufaux.c | 9 | ||||
-rw-r--r-- | bufaux.h | 7 | ||||
-rw-r--r-- | packet.c | 6 |
4 files changed, 13 insertions, 14 deletions
@@ -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 | ||
68 | 20020121 | 71 | 20020121 |
@@ -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 $ |
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include "includes.h" | 39 | #include "includes.h" |
40 | RCSID("$OpenBSD: bufaux.c,v 1.20 2001/12/19 17:16:13 stevesk Exp $"); | 40 | RCSID("$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 | */ |
80 | int | 80 | void |
81 | buffer_get_bignum(Buffer *buffer, BIGNUM *value) | 81 | buffer_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 | ||
133 | int | 131 | void |
134 | buffer_get_bignum2(Buffer *buffer, BIGNUM *value) | 132 | buffer_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 | /* |
@@ -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 | ||
21 | void buffer_put_bignum(Buffer *, BIGNUM *); | 21 | void buffer_put_bignum(Buffer *, BIGNUM *); |
22 | void buffer_put_bignum2(Buffer *, BIGNUM *); | 22 | void buffer_put_bignum2(Buffer *, BIGNUM *); |
23 | 23 | void buffer_get_bignum(Buffer *, BIGNUM *); | |
24 | int buffer_get_bignum(Buffer *, BIGNUM *); | 24 | void buffer_get_bignum2(Buffer *, BIGNUM *); |
25 | int buffer_get_bignum2(Buffer *, BIGNUM *); | ||
26 | 25 | ||
27 | u_int buffer_get_int(Buffer *); | 26 | u_int buffer_get_int(Buffer *); |
28 | void buffer_put_int(Buffer *, u_int); | 27 | void buffer_put_int(Buffer *, u_int); |
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | 38 | ||
39 | #include "includes.h" | 39 | #include "includes.h" |
40 | RCSID("$OpenBSD: packet.c,v 1.80 2001/12/28 13:57:33 markus Exp $"); | 40 | RCSID("$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) | |||
1002 | void | 1002 | void |
1003 | packet_get_bignum(BIGNUM * value) | 1003 | packet_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 | ||
1008 | void | 1008 | void |
1009 | packet_get_bignum2(BIGNUM * value) | 1009 | packet_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 | ||
1014 | void * | 1014 | void * |