diff options
author | Damien Miller <djm@mindrot.org> | 2000-04-16 12:31:48 +1000 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2000-04-16 12:31:48 +1000 |
commit | 5f05637b0ef7058d3ab2ff385251f73dcc9cb5f7 (patch) | |
tree | 443665fb58916f33c2f346aa3284a444d3352311 /bufaux.c | |
parent | a664e870f27e6dc2c73f393e95a229abc527e0e6 (diff) |
- Reduce diff against OpenBSD source
- All OpenSSL includes are now unconditionally referenced as
openssl/foo.h
- Pick up formatting changes
- Other minor changed (typecasts, etc) that I missed
Diffstat (limited to 'bufaux.c')
-rw-r--r-- | bufaux.c | 21 |
1 files changed, 7 insertions, 14 deletions
@@ -17,17 +17,10 @@ | |||
17 | */ | 17 | */ |
18 | 18 | ||
19 | #include "includes.h" | 19 | #include "includes.h" |
20 | RCSID("$Id: bufaux.c,v 1.11 2000/04/16 01:18:40 damien Exp $"); | 20 | RCSID("$Id: bufaux.c,v 1.12 2000/04/16 02:31:50 damien Exp $"); |
21 | 21 | ||
22 | #include "ssh.h" | 22 | #include "ssh.h" |
23 | |||
24 | #ifdef HAVE_OPENSSL | ||
25 | #include <openssl/bn.h> | 23 | #include <openssl/bn.h> |
26 | #endif | ||
27 | #ifdef HAVE_SSL | ||
28 | #include <ssl/bn.h> | ||
29 | #endif | ||
30 | |||
31 | #include "bufaux.h" | 24 | #include "bufaux.h" |
32 | #include "xmalloc.h" | 25 | #include "xmalloc.h" |
33 | #include "getput.h" | 26 | #include "getput.h" |
@@ -131,7 +124,7 @@ buffer_get_bignum2(Buffer *buffer, BIGNUM *value) | |||
131 | /* | 124 | /* |
132 | * Returns an integer from the buffer (4 bytes, msb first). | 125 | * Returns an integer from the buffer (4 bytes, msb first). |
133 | */ | 126 | */ |
134 | unsigned int | 127 | unsigned int |
135 | buffer_get_int(Buffer *buffer) | 128 | buffer_get_int(Buffer *buffer) |
136 | { | 129 | { |
137 | unsigned char buf[4]; | 130 | unsigned char buf[4]; |
@@ -142,7 +135,7 @@ buffer_get_int(Buffer *buffer) | |||
142 | /* | 135 | /* |
143 | * Stores an integer in the buffer in 4 bytes, msb first. | 136 | * Stores an integer in the buffer in 4 bytes, msb first. |
144 | */ | 137 | */ |
145 | void | 138 | void |
146 | buffer_put_int(Buffer *buffer, unsigned int value) | 139 | buffer_put_int(Buffer *buffer, unsigned int value) |
147 | { | 140 | { |
148 | char buf[4]; | 141 | char buf[4]; |
@@ -182,13 +175,13 @@ buffer_get_string(Buffer *buffer, unsigned int *length_ptr) | |||
182 | /* | 175 | /* |
183 | * Stores and arbitrary binary string in the buffer. | 176 | * Stores and arbitrary binary string in the buffer. |
184 | */ | 177 | */ |
185 | void | 178 | void |
186 | buffer_put_string(Buffer *buffer, const void *buf, unsigned int len) | 179 | buffer_put_string(Buffer *buffer, const void *buf, unsigned int len) |
187 | { | 180 | { |
188 | buffer_put_int(buffer, len); | 181 | buffer_put_int(buffer, len); |
189 | buffer_append(buffer, buf, len); | 182 | buffer_append(buffer, buf, len); |
190 | } | 183 | } |
191 | void | 184 | void |
192 | buffer_put_cstring(Buffer *buffer, const char *s) | 185 | buffer_put_cstring(Buffer *buffer, const char *s) |
193 | { | 186 | { |
194 | buffer_put_string(buffer, s, strlen(s)); | 187 | buffer_put_string(buffer, s, strlen(s)); |
@@ -197,7 +190,7 @@ buffer_put_cstring(Buffer *buffer, const char *s) | |||
197 | /* | 190 | /* |
198 | * Returns a character from the buffer (0 - 255). | 191 | * Returns a character from the buffer (0 - 255). |
199 | */ | 192 | */ |
200 | int | 193 | int |
201 | buffer_get_char(Buffer *buffer) | 194 | buffer_get_char(Buffer *buffer) |
202 | { | 195 | { |
203 | char ch; | 196 | char ch; |
@@ -208,7 +201,7 @@ buffer_get_char(Buffer *buffer) | |||
208 | /* | 201 | /* |
209 | * Stores a character in the buffer. | 202 | * Stores a character in the buffer. |
210 | */ | 203 | */ |
211 | void | 204 | void |
212 | buffer_put_char(Buffer *buffer, int value) | 205 | buffer_put_char(Buffer *buffer, int value) |
213 | { | 206 | { |
214 | char ch = value; | 207 | char ch = value; |