summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2001-09-18 05:41:19 +0000
committerBen Lindstrom <mouring@eviladmin.org>2001-09-18 05:41:19 +0000
commit9e0ddd4379242d325157e38d406e5ed80ba0892c (patch)
tree6a5edbe9c4e33e195e52ddb11e6c30d3a6e63fb8
parent1e2432416483351ba18ac7ea21538b138db583ae (diff)
- stevesk@cvs.openbsd.org 2001/09/17 19:27:15
[kexdh.c kexgex.c key.c key.h ssh-dss.c ssh-keygen.c ssh-rsa.c] u_char*/char* cleanup; ok markus
-rw-r--r--ChangeLog5
-rw-r--r--kexdh.c14
-rw-r--r--kexgex.c12
-rw-r--r--key.c4
-rw-r--r--key.h4
-rw-r--r--ssh-dss.c6
-rw-r--r--ssh-keygen.c6
-rw-r--r--ssh-rsa.c6
8 files changed, 30 insertions, 27 deletions
diff --git a/ChangeLog b/ChangeLog
index 3c0cb6afc..d00aaadab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,6 +12,9 @@
12 - stevesk@cvs.openbsd.org 2001/09/17 17:57:57 12 - stevesk@cvs.openbsd.org 2001/09/17 17:57:57
13 [scp.1 scp.c sftp.1 sftp.c] 13 [scp.1 scp.c sftp.1 sftp.c]
14 add -Fssh_config option; ok markus@ 14 add -Fssh_config option; ok markus@
15 - stevesk@cvs.openbsd.org 2001/09/17 19:27:15
16 [kexdh.c kexgex.c key.c key.h ssh-dss.c ssh-keygen.c ssh-rsa.c]
17 u_char*/char* cleanup; ok markus
15 18
1620010917 1920010917
17 - (djm) x11-ssh-askpass-1.2.4 in RPM spec, revert workarounds 20 - (djm) x11-ssh-askpass-1.2.4 in RPM spec, revert workarounds
@@ -6472,4 +6475,4 @@
6472 - Wrote replacements for strlcpy and mkdtemp 6475 - Wrote replacements for strlcpy and mkdtemp
6473 - Released 1.0pre1 6476 - Released 1.0pre1
6474 6477
6475$Id: ChangeLog,v 1.1532 2001/09/18 05:38:44 mouring Exp $ 6478$Id: ChangeLog,v 1.1533 2001/09/18 05:41:19 mouring Exp $
diff --git a/kexdh.c b/kexdh.c
index 3e96a1ab3..b850a1a22 100644
--- a/kexdh.c
+++ b/kexdh.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: kexdh.c,v 1.6 2001/06/23 15:12:18 itojun Exp $"); 26RCSID("$OpenBSD: kexdh.c,v 1.7 2001/09/17 19:27:15 stevesk Exp $");
27 27
28#include <openssl/crypto.h> 28#include <openssl/crypto.h>
29#include <openssl/bn.h> 29#include <openssl/bn.h>
@@ -44,7 +44,7 @@ kex_dh_hash(
44 char *server_version_string, 44 char *server_version_string,
45 char *ckexinit, int ckexinitlen, 45 char *ckexinit, int ckexinitlen,
46 char *skexinit, int skexinitlen, 46 char *skexinit, int skexinitlen,
47 char *serverhostkeyblob, int sbloblen, 47 u_char *serverhostkeyblob, int sbloblen,
48 BIGNUM *client_dh_pub, 48 BIGNUM *client_dh_pub,
49 BIGNUM *server_dh_pub, 49 BIGNUM *server_dh_pub,
50 BIGNUM *shared_secret) 50 BIGNUM *shared_secret)
@@ -94,7 +94,7 @@ kexdh_client(Kex *kex)
94 BIGNUM *dh_server_pub = NULL, *shared_secret = NULL; 94 BIGNUM *dh_server_pub = NULL, *shared_secret = NULL;
95 DH *dh; 95 DH *dh;
96 Key *server_host_key; 96 Key *server_host_key;
97 char *server_host_key_blob = NULL, *signature = NULL; 97 u_char *server_host_key_blob = NULL, *signature = NULL;
98 u_char *kbuf, *hash; 98 u_char *kbuf, *hash;
99 u_int klen, kout, slen, sbloblen; 99 u_int klen, kout, slen, sbloblen;
100 int dlen, plen; 100 int dlen, plen;
@@ -174,7 +174,7 @@ kexdh_client(Kex *kex)
174 BN_free(dh_server_pub); 174 BN_free(dh_server_pub);
175 DH_free(dh); 175 DH_free(dh);
176 176
177 if (key_verify(server_host_key, (u_char *)signature, slen, hash, 20) != 1) 177 if (key_verify(server_host_key, signature, slen, hash, 20) != 1)
178 fatal("key_verify failed for server_host_key"); 178 fatal("key_verify failed for server_host_key");
179 key_free(server_host_key); 179 key_free(server_host_key);
180 xfree(signature); 180 xfree(signature);
@@ -257,7 +257,7 @@ kexdh_server(Kex *kex)
257 kex->server_version_string, 257 kex->server_version_string,
258 buffer_ptr(&kex->peer), buffer_len(&kex->peer), 258 buffer_ptr(&kex->peer), buffer_len(&kex->peer),
259 buffer_ptr(&kex->my), buffer_len(&kex->my), 259 buffer_ptr(&kex->my), buffer_len(&kex->my),
260 (char *)server_host_key_blob, sbloblen, 260 server_host_key_blob, sbloblen,
261 dh_client_pub, 261 dh_client_pub,
262 dh->pub_key, 262 dh->pub_key,
263 shared_secret 263 shared_secret
@@ -280,9 +280,9 @@ kexdh_server(Kex *kex)
280 280
281 /* send server hostkey, DH pubkey 'f' and singed H */ 281 /* send server hostkey, DH pubkey 'f' and singed H */
282 packet_start(SSH2_MSG_KEXDH_REPLY); 282 packet_start(SSH2_MSG_KEXDH_REPLY);
283 packet_put_string((char *)server_host_key_blob, sbloblen); 283 packet_put_string(server_host_key_blob, sbloblen);
284 packet_put_bignum2(dh->pub_key); /* f */ 284 packet_put_bignum2(dh->pub_key); /* f */
285 packet_put_string((char *)signature, slen); 285 packet_put_string(signature, slen);
286 packet_send(); 286 packet_send();
287 287
288 xfree(signature); 288 xfree(signature);
diff --git a/kexgex.c b/kexgex.c
index 1bc6b7e15..f06f2c355 100644
--- a/kexgex.c
+++ b/kexgex.c
@@ -24,7 +24,7 @@
24 */ 24 */
25 25
26#include "includes.h" 26#include "includes.h"
27RCSID("$OpenBSD: kexgex.c,v 1.8 2001/06/23 15:12:19 itojun Exp $"); 27RCSID("$OpenBSD: kexgex.c,v 1.9 2001/09/17 19:27:15 stevesk Exp $");
28 28
29#include <openssl/bn.h> 29#include <openssl/bn.h>
30 30
@@ -45,7 +45,7 @@ kexgex_hash(
45 char *server_version_string, 45 char *server_version_string,
46 char *ckexinit, int ckexinitlen, 46 char *ckexinit, int ckexinitlen,
47 char *skexinit, int skexinitlen, 47 char *skexinit, int skexinitlen,
48 char *serverhostkeyblob, int sbloblen, 48 u_char *serverhostkeyblob, int sbloblen,
49 int min, int wantbits, int max, BIGNUM *prime, BIGNUM *gen, 49 int min, int wantbits, int max, BIGNUM *prime, BIGNUM *gen,
50 BIGNUM *client_dh_pub, 50 BIGNUM *client_dh_pub,
51 BIGNUM *server_dh_pub, 51 BIGNUM *server_dh_pub,
@@ -234,7 +234,7 @@ kexgex_client(Kex *kex)
234 xfree(server_host_key_blob); 234 xfree(server_host_key_blob);
235 BN_free(dh_server_pub); 235 BN_free(dh_server_pub);
236 236
237 if (key_verify(server_host_key, (u_char *)signature, slen, hash, 20) != 1) 237 if (key_verify(server_host_key, signature, slen, hash, 20) != 1)
238 fatal("key_verify failed for server_host_key"); 238 fatal("key_verify failed for server_host_key");
239 key_free(server_host_key); 239 key_free(server_host_key);
240 xfree(signature); 240 xfree(signature);
@@ -358,7 +358,7 @@ kexgex_server(Kex *kex)
358 kex->server_version_string, 358 kex->server_version_string,
359 buffer_ptr(&kex->peer), buffer_len(&kex->peer), 359 buffer_ptr(&kex->peer), buffer_len(&kex->peer),
360 buffer_ptr(&kex->my), buffer_len(&kex->my), 360 buffer_ptr(&kex->my), buffer_len(&kex->my),
361 (char *)server_host_key_blob, sbloblen, 361 server_host_key_blob, sbloblen,
362 min, nbits, max, 362 min, nbits, max,
363 dh->p, dh->g, 363 dh->p, dh->g,
364 dh_client_pub, 364 dh_client_pub,
@@ -384,9 +384,9 @@ kexgex_server(Kex *kex)
384 /* send server hostkey, DH pubkey 'f' and singed H */ 384 /* send server hostkey, DH pubkey 'f' and singed H */
385 debug("SSH2_MSG_KEX_DH_GEX_REPLY sent"); 385 debug("SSH2_MSG_KEX_DH_GEX_REPLY sent");
386 packet_start(SSH2_MSG_KEX_DH_GEX_REPLY); 386 packet_start(SSH2_MSG_KEX_DH_GEX_REPLY);
387 packet_put_string((char *)server_host_key_blob, sbloblen); 387 packet_put_string(server_host_key_blob, sbloblen);
388 packet_put_bignum2(dh->pub_key); /* f */ 388 packet_put_bignum2(dh->pub_key); /* f */
389 packet_put_string((char *)signature, slen); 389 packet_put_string(signature, slen);
390 packet_send(); 390 packet_send();
391 xfree(signature); 391 xfree(signature);
392 xfree(server_host_key_blob); 392 xfree(server_host_key_blob);
diff --git a/key.c b/key.c
index 0ddd3d9d4..482168de0 100644
--- a/key.c
+++ b/key.c
@@ -32,7 +32,7 @@
32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 32 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 */ 33 */
34#include "includes.h" 34#include "includes.h"
35RCSID("$OpenBSD: key.c,v 1.29 2001/06/26 20:14:10 markus Exp $"); 35RCSID("$OpenBSD: key.c,v 1.30 2001/09/17 19:27:15 stevesk Exp $");
36 36
37#include <openssl/evp.h> 37#include <openssl/evp.h>
38 38
@@ -653,7 +653,7 @@ key_names_valid2(const char *names)
653} 653}
654 654
655Key * 655Key *
656key_from_blob(char *blob, int blen) 656key_from_blob(u_char *blob, int blen)
657{ 657{
658 Buffer b; 658 Buffer b;
659 char *ktype; 659 char *ktype;
diff --git a/key.h b/key.h
index 2b4fbce04..00eebb7f1 100644
--- a/key.h
+++ b/key.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: key.h,v 1.16 2001/06/26 20:14:10 markus Exp $ */ 1/* $OpenBSD: key.h,v 1.17 2001/09/17 19:27:15 stevesk Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved.
@@ -69,7 +69,7 @@ Key *key_generate(int, u_int);
69Key *key_from_private(Key *); 69Key *key_from_private(Key *);
70int key_type_from_name(char *); 70int key_type_from_name(char *);
71 71
72Key *key_from_blob(char *, int); 72Key *key_from_blob(u_char *, int);
73int key_to_blob(Key *, u_char **, u_int *); 73int key_to_blob(Key *, u_char **, u_int *);
74char *key_ssh_name(Key *); 74char *key_ssh_name(Key *);
75int key_names_valid2(const char *); 75int key_names_valid2(const char *);
diff --git a/ssh-dss.c b/ssh-dss.c
index 5cf007667..22fffa02a 100644
--- a/ssh-dss.c
+++ b/ssh-dss.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: ssh-dss.c,v 1.7 2001/06/06 23:13:54 markus Exp $"); 26RCSID("$OpenBSD: ssh-dss.c,v 1.8 2001/09/17 19:27:15 stevesk Exp $");
27 27
28#include <openssl/bn.h> 28#include <openssl/bn.h>
29#include <openssl/evp.h> 29#include <openssl/evp.h>
@@ -133,14 +133,14 @@ ssh_dss_verify(
133 /* ietf-drafts */ 133 /* ietf-drafts */
134 char *ktype; 134 char *ktype;
135 buffer_init(&b); 135 buffer_init(&b);
136 buffer_append(&b, (char *) signature, signaturelen); 136 buffer_append(&b, signature, signaturelen);
137 ktype = buffer_get_string(&b, NULL); 137 ktype = buffer_get_string(&b, NULL);
138 if (strcmp("ssh-dss", ktype) != 0) { 138 if (strcmp("ssh-dss", ktype) != 0) {
139 error("ssh_dss_verify: cannot handle type %s", ktype); 139 error("ssh_dss_verify: cannot handle type %s", ktype);
140 buffer_free(&b); 140 buffer_free(&b);
141 return -1; 141 return -1;
142 } 142 }
143 sigblob = (u_char *)buffer_get_string(&b, &len); 143 sigblob = buffer_get_string(&b, &len);
144 rlen = buffer_len(&b); 144 rlen = buffer_len(&b);
145 if(rlen != 0) { 145 if(rlen != 0) {
146 error("remaining bytes in signature %d", rlen); 146 error("remaining bytes in signature %d", rlen);
diff --git a/ssh-keygen.c b/ssh-keygen.c
index cd1674b04..db4fef2fe 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -12,7 +12,7 @@
12 */ 12 */
13 13
14#include "includes.h" 14#include "includes.h"
15RCSID("$OpenBSD: ssh-keygen.c,v 1.79 2001/08/02 16:14:05 jakob Exp $"); 15RCSID("$OpenBSD: ssh-keygen.c,v 1.80 2001/09/17 19:27:15 stevesk Exp $");
16 16
17#include <openssl/evp.h> 17#include <openssl/evp.h>
18#include <openssl/pem.h> 18#include <openssl/pem.h>
@@ -190,7 +190,7 @@ buffer_get_bignum_bits(Buffer *b, BIGNUM *value)
190} 190}
191 191
192static Key * 192static Key *
193do_convert_private_ssh2_from_blob(char *blob, int blen) 193do_convert_private_ssh2_from_blob(u_char *blob, int blen)
194{ 194{
195 Buffer b; 195 Buffer b;
196 Key *key = NULL; 196 Key *key = NULL;
@@ -287,7 +287,7 @@ do_convert_from_ssh2(struct passwd *pw)
287 Key *k; 287 Key *k;
288 int blen; 288 int blen;
289 char line[1024], *p; 289 char line[1024], *p;
290 char blob[8096]; 290 u_char blob[8096];
291 char encoded[8096]; 291 char encoded[8096];
292 struct stat st; 292 struct stat st;
293 int escaped = 0, private = 0, ok; 293 int escaped = 0, private = 0, ok;
diff --git a/ssh-rsa.c b/ssh-rsa.c
index a4ab3c516..15ce5e977 100644
--- a/ssh-rsa.c
+++ b/ssh-rsa.c
@@ -23,7 +23,7 @@
23 */ 23 */
24 24
25#include "includes.h" 25#include "includes.h"
26RCSID("$OpenBSD: ssh-rsa.c,v 1.9 2001/06/06 23:13:54 markus Exp $"); 26RCSID("$OpenBSD: ssh-rsa.c,v 1.10 2001/09/17 19:27:15 stevesk Exp $");
27 27
28#include <openssl/evp.h> 28#include <openssl/evp.h>
29#include <openssl/err.h> 29#include <openssl/err.h>
@@ -130,7 +130,7 @@ ssh_rsa_verify(
130 return -1; 130 return -1;
131 } 131 }
132 buffer_init(&b); 132 buffer_init(&b);
133 buffer_append(&b, (char *) signature, signaturelen); 133 buffer_append(&b, signature, signaturelen);
134 ktype = buffer_get_string(&b, NULL); 134 ktype = buffer_get_string(&b, NULL);
135 if (strcmp("ssh-rsa", ktype) != 0) { 135 if (strcmp("ssh-rsa", ktype) != 0) {
136 error("ssh_rsa_verify: cannot handle type %s", ktype); 136 error("ssh_rsa_verify: cannot handle type %s", ktype);
@@ -139,7 +139,7 @@ ssh_rsa_verify(
139 return -1; 139 return -1;
140 } 140 }
141 xfree(ktype); 141 xfree(ktype);
142 sigblob = (u_char *)buffer_get_string(&b, &len); 142 sigblob = buffer_get_string(&b, &len);
143 rlen = buffer_len(&b); 143 rlen = buffer_len(&b);
144 buffer_free(&b); 144 buffer_free(&b);
145 if(rlen != 0) { 145 if(rlen != 0) {