Commit 9e0ddd43 authored by Ben Lindstrom's avatar Ben Lindstrom

- 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
parent 1e243241
......@@ -12,6 +12,9 @@
- stevesk@cvs.openbsd.org 2001/09/17 17:57:57
[scp.1 scp.c sftp.1 sftp.c]
add -Fssh_config option; ok markus@
- 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
20010917
- (djm) x11-ssh-askpass-1.2.4 in RPM spec, revert workarounds
......@@ -6472,4 +6475,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
$Id: ChangeLog,v 1.1532 2001/09/18 05:38:44 mouring Exp $
$Id: ChangeLog,v 1.1533 2001/09/18 05:41:19 mouring Exp $
......@@ -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);
......
......@@ -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);
......
......@@ -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;
......
/* $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 *);
......
......@@ -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);
......
......@@ -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>
......@@ -190,7 +190,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;
......@@ -287,7 +287,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;
......
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment