diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/kexdh.c | 14 | ||||
-rw-r--r-- | usr.bin/ssh/kexgex.c | 12 | ||||
-rw-r--r-- | usr.bin/ssh/key.c | 4 | ||||
-rw-r--r-- | usr.bin/ssh/key.h | 4 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-dss.c | 6 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-keygen.c | 6 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-rsa.c | 6 |
7 files changed, 26 insertions, 26 deletions
diff --git a/usr.bin/ssh/kexdh.c b/usr.bin/ssh/kexdh.c index 3e96a1ab3ba..b850a1a226e 100644 --- a/usr.bin/ssh/kexdh.c +++ b/usr.bin/ssh/kexdh.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: kexdh.c,v 1.6 2001/06/23 15:12:18 itojun Exp $"); +RCSID("$OpenBSD: kexdh.c,v 1.7 2001/09/17 19:27:15 stevesk Exp $"); #include <openssl/crypto.h> #include <openssl/bn.h> @@ -44,7 +44,7 @@ kex_dh_hash( char *server_version_string, char *ckexinit, int ckexinitlen, char *skexinit, int skexinitlen, - char *serverhostkeyblob, int sbloblen, + u_char *serverhostkeyblob, int sbloblen, BIGNUM *client_dh_pub, BIGNUM *server_dh_pub, BIGNUM *shared_secret) @@ -94,7 +94,7 @@ kexdh_client(Kex *kex) BIGNUM *dh_server_pub = NULL, *shared_secret = NULL; DH *dh; Key *server_host_key; - char *server_host_key_blob = NULL, *signature = NULL; + u_char *server_host_key_blob = NULL, *signature = NULL; u_char *kbuf, *hash; u_int klen, kout, slen, sbloblen; int dlen, plen; @@ -174,7 +174,7 @@ kexdh_client(Kex *kex) BN_free(dh_server_pub); DH_free(dh); - if (key_verify(server_host_key, (u_char *)signature, slen, hash, 20) != 1) + if (key_verify(server_host_key, signature, slen, hash, 20) != 1) fatal("key_verify failed for server_host_key"); key_free(server_host_key); xfree(signature); @@ -257,7 +257,7 @@ kexdh_server(Kex *kex) kex->server_version_string, buffer_ptr(&kex->peer), buffer_len(&kex->peer), buffer_ptr(&kex->my), buffer_len(&kex->my), - (char *)server_host_key_blob, sbloblen, + server_host_key_blob, sbloblen, dh_client_pub, dh->pub_key, shared_secret @@ -280,9 +280,9 @@ kexdh_server(Kex *kex) /* send server hostkey, DH pubkey 'f' and singed H */ packet_start(SSH2_MSG_KEXDH_REPLY); - packet_put_string((char *)server_host_key_blob, sbloblen); + packet_put_string(server_host_key_blob, sbloblen); packet_put_bignum2(dh->pub_key); /* f */ - packet_put_string((char *)signature, slen); + packet_put_string(signature, slen); packet_send(); xfree(signature); diff --git a/usr.bin/ssh/kexgex.c b/usr.bin/ssh/kexgex.c index 1bc6b7e15ac..f06f2c35524 100644 --- a/usr.bin/ssh/kexgex.c +++ b/usr.bin/ssh/kexgex.c @@ -24,7 +24,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: kexgex.c,v 1.8 2001/06/23 15:12:19 itojun Exp $"); +RCSID("$OpenBSD: kexgex.c,v 1.9 2001/09/17 19:27:15 stevesk Exp $"); #include <openssl/bn.h> @@ -45,7 +45,7 @@ kexgex_hash( char *server_version_string, char *ckexinit, int ckexinitlen, char *skexinit, int skexinitlen, - char *serverhostkeyblob, int sbloblen, + u_char *serverhostkeyblob, int sbloblen, int min, int wantbits, int max, BIGNUM *prime, BIGNUM *gen, BIGNUM *client_dh_pub, BIGNUM *server_dh_pub, @@ -234,7 +234,7 @@ kexgex_client(Kex *kex) xfree(server_host_key_blob); BN_free(dh_server_pub); - if (key_verify(server_host_key, (u_char *)signature, slen, hash, 20) != 1) + if (key_verify(server_host_key, signature, slen, hash, 20) != 1) fatal("key_verify failed for server_host_key"); key_free(server_host_key); xfree(signature); @@ -358,7 +358,7 @@ kexgex_server(Kex *kex) kex->server_version_string, buffer_ptr(&kex->peer), buffer_len(&kex->peer), buffer_ptr(&kex->my), buffer_len(&kex->my), - (char *)server_host_key_blob, sbloblen, + server_host_key_blob, sbloblen, min, nbits, max, dh->p, dh->g, dh_client_pub, @@ -384,9 +384,9 @@ kexgex_server(Kex *kex) /* send server hostkey, DH pubkey 'f' and singed H */ debug("SSH2_MSG_KEX_DH_GEX_REPLY sent"); packet_start(SSH2_MSG_KEX_DH_GEX_REPLY); - packet_put_string((char *)server_host_key_blob, sbloblen); + packet_put_string(server_host_key_blob, sbloblen); packet_put_bignum2(dh->pub_key); /* f */ - packet_put_string((char *)signature, slen); + packet_put_string(signature, slen); packet_send(); xfree(signature); xfree(server_host_key_blob); diff --git a/usr.bin/ssh/key.c b/usr.bin/ssh/key.c index 0ddd3d9d476..482168de08f 100644 --- a/usr.bin/ssh/key.c +++ b/usr.bin/ssh/key.c @@ -32,7 +32,7 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include "includes.h" -RCSID("$OpenBSD: key.c,v 1.29 2001/06/26 20:14:10 markus Exp $"); +RCSID("$OpenBSD: key.c,v 1.30 2001/09/17 19:27:15 stevesk Exp $"); #include <openssl/evp.h> @@ -653,7 +653,7 @@ key_names_valid2(const char *names) } Key * -key_from_blob(char *blob, int blen) +key_from_blob(u_char *blob, int blen) { Buffer b; char *ktype; diff --git a/usr.bin/ssh/key.h b/usr.bin/ssh/key.h index 2b4fbce046f..00eebb7f1a1 100644 --- a/usr.bin/ssh/key.h +++ b/usr.bin/ssh/key.h @@ -1,4 +1,4 @@ -/* $OpenBSD: key.h,v 1.16 2001/06/26 20:14:10 markus Exp $ */ +/* $OpenBSD: key.h,v 1.17 2001/09/17 19:27:15 stevesk Exp $ */ /* * Copyright (c) 2000, 2001 Markus Friedl. All rights reserved. @@ -69,7 +69,7 @@ Key *key_generate(int, u_int); Key *key_from_private(Key *); int key_type_from_name(char *); -Key *key_from_blob(char *, int); +Key *key_from_blob(u_char *, int); int key_to_blob(Key *, u_char **, u_int *); char *key_ssh_name(Key *); int key_names_valid2(const char *); diff --git a/usr.bin/ssh/ssh-dss.c b/usr.bin/ssh/ssh-dss.c index 5cf0076672b..22fffa02afa 100644 --- a/usr.bin/ssh/ssh-dss.c +++ b/usr.bin/ssh/ssh-dss.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-dss.c,v 1.7 2001/06/06 23:13:54 markus Exp $"); +RCSID("$OpenBSD: ssh-dss.c,v 1.8 2001/09/17 19:27:15 stevesk Exp $"); #include <openssl/bn.h> #include <openssl/evp.h> @@ -133,14 +133,14 @@ ssh_dss_verify( /* ietf-drafts */ char *ktype; buffer_init(&b); - buffer_append(&b, (char *) signature, signaturelen); + buffer_append(&b, signature, signaturelen); ktype = buffer_get_string(&b, NULL); if (strcmp("ssh-dss", ktype) != 0) { error("ssh_dss_verify: cannot handle type %s", ktype); buffer_free(&b); return -1; } - sigblob = (u_char *)buffer_get_string(&b, &len); + sigblob = buffer_get_string(&b, &len); rlen = buffer_len(&b); if(rlen != 0) { error("remaining bytes in signature %d", rlen); diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c index d831b539a50..ed2be941870 100644 --- a/usr.bin/ssh/ssh-keygen.c +++ b/usr.bin/ssh/ssh-keygen.c @@ -12,7 +12,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-keygen.c,v 1.79 2001/08/02 16:14:05 jakob Exp $"); +RCSID("$OpenBSD: ssh-keygen.c,v 1.80 2001/09/17 19:27:15 stevesk Exp $"); #include <openssl/evp.h> #include <openssl/pem.h> @@ -186,7 +186,7 @@ buffer_get_bignum_bits(Buffer *b, BIGNUM *value) } static Key * -do_convert_private_ssh2_from_blob(char *blob, int blen) +do_convert_private_ssh2_from_blob(u_char *blob, int blen) { Buffer b; Key *key = NULL; @@ -283,7 +283,7 @@ do_convert_from_ssh2(struct passwd *pw) Key *k; int blen; char line[1024], *p; - char blob[8096]; + u_char blob[8096]; char encoded[8096]; struct stat st; int escaped = 0, private = 0, ok; diff --git a/usr.bin/ssh/ssh-rsa.c b/usr.bin/ssh/ssh-rsa.c index a4ab3c51680..15ce5e977f0 100644 --- a/usr.bin/ssh/ssh-rsa.c +++ b/usr.bin/ssh/ssh-rsa.c @@ -23,7 +23,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: ssh-rsa.c,v 1.9 2001/06/06 23:13:54 markus Exp $"); +RCSID("$OpenBSD: ssh-rsa.c,v 1.10 2001/09/17 19:27:15 stevesk Exp $"); #include <openssl/evp.h> #include <openssl/err.h> @@ -130,7 +130,7 @@ ssh_rsa_verify( return -1; } buffer_init(&b); - buffer_append(&b, (char *) signature, signaturelen); + buffer_append(&b, signature, signaturelen); ktype = buffer_get_string(&b, NULL); if (strcmp("ssh-rsa", ktype) != 0) { error("ssh_rsa_verify: cannot handle type %s", ktype); @@ -139,7 +139,7 @@ ssh_rsa_verify( return -1; } xfree(ktype); - sigblob = (u_char *)buffer_get_string(&b, &len); + sigblob = buffer_get_string(&b, &len); rlen = buffer_len(&b); buffer_free(&b); if(rlen != 0) { |