]> andersk Git - openssh.git/commitdiff
- markus@cvs.openbsd.org 2002/02/24 19:14:59
authormouring <mouring>
Tue, 26 Feb 2002 18:09:42 +0000 (18:09 +0000)
committermouring <mouring>
Tue, 26 Feb 2002 18:09:42 +0000 (18:09 +0000)
     [auth2.c authfd.c authfd.h authfile.c kexdh.c kexgex.c key.c key.h
      ssh-dss.c ssh-dss.h ssh-keygen.c ssh-rsa.c ssh-rsa.h sshconnect2.c]
     signed vs. unsigned: make size arguments u_int, ok stevesk@

15 files changed:
ChangeLog
auth2.c
authfd.c
authfd.h
authfile.c
kexdh.c
kexgex.c
key.c
key.h
ssh-dss.c
ssh-dss.h
ssh-keygen.c
ssh-rsa.c
ssh-rsa.h
sshconnect2.c

index b4d7eb8bb4e5c27ec753d38701741f80a7e850f2..7c7bd08d2058ba5a6d060b3f771063a29327e4a0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
    - markus@cvs.openbsd.org 2002/02/24 18:31:09
      [uuencode.c]
      typo in comment
+   - markus@cvs.openbsd.org 2002/02/24 19:14:59
+     [auth2.c authfd.c authfd.h authfile.c kexdh.c kexgex.c key.c key.h 
+      ssh-dss.c ssh-dss.h ssh-keygen.c ssh-rsa.c ssh-rsa.h sshconnect2.c]
+     signed vs. unsigned: make size arguments u_int, ok stevesk@
 
 20020225
  - (bal) Last AIX patch.  Moved aix_usrinfo() outside of do_setuserconext()
diff --git a/auth2.c b/auth2.c
index 22b5586967d561dbb5305a13969ca837d3b288d3..f2a801ecc8207b4dbee68803c9f0cc62b9cfd7e4 100644 (file)
--- a/auth2.c
+++ b/auth2.c
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: auth2.c,v 1.84 2002/02/04 11:58:10 markus Exp $");
+RCSID("$OpenBSD: auth2.c,v 1.85 2002/02/24 19:14:59 markus Exp $");
 
 #include <openssl/evp.h>
 
@@ -398,7 +398,8 @@ userauth_pubkey(Authctxt *authctxt)
 {
        Buffer b;
        Key *key = NULL;
-       char *pkalg, *pkblob, *sig;
+       char *pkalg;
+       u_char *pkblob, *sig;
        u_int alen, blen, slen;
        int have_sig, pktype;
        int authenticated = 0;
@@ -512,7 +513,8 @@ userauth_hostbased(Authctxt *authctxt)
 {
        Buffer b;
        Key *key = NULL;
-       char *pkalg, *pkblob, *sig, *cuser, *chost, *service;
+       char *pkalg, *cuser, *chost, *service;
+       u_char *pkblob, *sig;
        u_int alen, blen, slen;
        int pktype;
        int authenticated = 0;
@@ -794,4 +796,3 @@ hostbased_key_allowed(struct passwd *pw, const char *cuser, char *chost,
 
        return (host_status == HOST_OK);
 }
-
index f90676cca46a167b1b9f26e2630c0d1ce7fc1f43..fa764358faccdb7045278552282f5f480e94254e 100644 (file)
--- a/authfd.c
+++ b/authfd.c
@@ -35,7 +35,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: authfd.c,v 1.47 2002/01/18 18:14:17 stevesk Exp $");
+RCSID("$OpenBSD: authfd.c,v 1.48 2002/02/24 19:14:59 markus Exp $");
 
 #include <openssl/evp.h>
 
@@ -374,8 +374,8 @@ ssh_decrypt_challenge(AuthenticationConnection *auth,
 int
 ssh_agent_sign(AuthenticationConnection *auth,
     Key *key,
-    u_char **sigp, int *lenp,
-    u_char *data, int datalen)
+    u_char **sigp, u_int *lenp,
+    u_char *data, u_int datalen)
 {
        extern int datafellows;
        Buffer msg;
index 8075a7ebddf18b9269f889152b56382d6035f98f..f4901f4a1dc8874235cd48ccace7951ce2ce98f7 100644 (file)
--- a/authfd.h
+++ b/authfd.h
@@ -11,7 +11,7 @@
  * called by a name other than "ssh" or "Secure Shell".
  */
 
-/* RCSID("$OpenBSD: authfd.h,v 1.21 2001/08/07 10:37:46 markus Exp $"); */
+/* RCSID("$OpenBSD: authfd.h,v 1.22 2002/02/24 19:14:59 markus Exp $"); */
 
 #ifndef AUTHFD_H
 #define AUTHFD_H
@@ -74,7 +74,7 @@ ssh_decrypt_challenge(AuthenticationConnection *, Key *, BIGNUM *, u_char[16],
     u_int, u_char[16]);
 
 int
-ssh_agent_sign(AuthenticationConnection *, Key *, u_char **, int *, u_char *,
-    int);
+ssh_agent_sign(AuthenticationConnection *, Key *, u_char **, u_int *, u_char *,
+    u_int);
 
 #endif                         /* AUTHFD_H */
index e35714e93be7cf9ced5242081e43cb127bb7f8ae..50ae9aa7814c158a2d0a94e9249dd95e8fb49a00 100644 (file)
@@ -36,7 +36,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: authfile.c,v 1.46 2002/02/14 23:41:01 markus Exp $");
+RCSID("$OpenBSD: authfile.c,v 1.47 2002/02/24 19:14:59 markus Exp $");
 
 #include <openssl/err.h>
 #include <openssl/evp.h>
@@ -168,7 +168,7 @@ key_save_private_pem(Key *key, const char *filename, const char *_passphrase,
        int fd;
        int success = 0;
        int len = strlen(_passphrase);
-       char *passphrase = (len > 0) ? (char *)_passphrase : NULL;
+       u_char *passphrase = (len > 0) ? (u_char *)_passphrase : NULL;
        EVP_CIPHER *cipher = (len > 0) ? EVP_des_ede3_cbc() : NULL;
 
        if (len > 0 && len <= 4) {
diff --git a/kexdh.c b/kexdh.c
index 2049d6e1b26c3bf2966b37c00d7feac2819f8866..cfeb6298af67e7eef07ff439a0ed605faab62382 100644 (file)
--- a/kexdh.c
+++ b/kexdh.c
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: kexdh.c,v 1.15 2002/02/23 17:59:02 markus Exp $");
+RCSID("$OpenBSD: kexdh.c,v 1.16 2002/02/24 19:14:59 markus Exp $");
 
 #include <openssl/crypto.h>
 #include <openssl/bn.h>
@@ -201,7 +201,7 @@ kexdh_server(Kex *kex)
        Key *server_host_key;
        u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL;
        u_int sbloblen, klen, kout;
-       int slen;
+       u_int slen;
 
        /* generate server DH public key */
        dh = dh_new_group1();
index ac377aafccb055c96f7c18014848ac6f4a27e0e5..06ed8e5a666842c9fe7f95092cb799df386ff5a8 100644 (file)
--- a/kexgex.c
+++ b/kexgex.c
@@ -24,7 +24,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: kexgex.c,v 1.18 2002/02/23 17:59:02 markus Exp $");
+RCSID("$OpenBSD: kexgex.c,v 1.19 2002/02/24 19:14:59 markus Exp $");
 
 #include <openssl/bn.h>
 
@@ -261,8 +261,8 @@ kexgex_server(Kex *kex)
        Key *server_host_key;
        DH *dh = dh;
        u_char *kbuf, *hash, *signature = NULL, *server_host_key_blob = NULL;
-       u_int sbloblen, klen, kout;
-       int min = -1, max = -1, nbits = -1, type, slen;
+       u_int sbloblen, klen, kout, slen;
+       int min = -1, max = -1, nbits = -1, type;
 
        if (kex->load_host_key == NULL)
                fatal("Cannot load hostkey");
diff --git a/key.c b/key.c
index 8b1057e8ece774cf9d5b68b18530a66ea056b0a7..d1355e871f5d15e92f404a5ee6ba36f2c0484771 100644 (file)
--- a/key.c
+++ b/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.39 2002/01/25 22:07:40 markus Exp $");
+RCSID("$OpenBSD: key.c,v 1.40 2002/02/24 19:14:59 markus Exp $");
 
 #include <openssl/evp.h>
 
@@ -176,7 +176,7 @@ key_fingerprint_raw(Key *k, enum fp_type dgst_type, u_int *dgst_raw_length)
        EVP_MD_CTX ctx;
        u_char *blob = NULL;
        u_char *retval = NULL;
-       int len = 0;
+       u_int len = 0;
        int nlen, elen;
 
        *dgst_raw_length = 0;
@@ -488,8 +488,9 @@ key_read(Key *ret, char **cpp)
 int
 key_write(Key *key, FILE *f)
 {
-       int success = 0;
-       u_int bits = 0;
+       int n, success = 0;
+       u_int len, bits = 0;
+       u_char *blob, *uu;
 
        if (key->type == KEY_RSA1 && key->rsa != NULL) {
                /* size of modulus 'n' */
@@ -503,8 +504,6 @@ key_write(Key *key, FILE *f)
                }
        } else if ((key->type == KEY_DSA && key->dsa != NULL) ||
            (key->type == KEY_RSA && key->rsa != NULL)) {
-               int len, n;
-               u_char *blob, *uu;
                key_to_blob(key, &blob, &len);
                uu = xmalloc(2*len);
                n = uuencode(blob, len, uu, 2*len);
@@ -763,8 +762,8 @@ key_to_blob(Key *key, u_char **blobp, u_int *lenp)
 int
 key_sign(
     Key *key,
-    u_char **sigp, int *lenp,
-    u_char *data, int datalen)
+    u_char **sigp, u_int *lenp,
+    u_char *data, u_int datalen)
 {
        switch (key->type) {
        case KEY_DSA:
@@ -783,8 +782,8 @@ key_sign(
 int
 key_verify(
     Key *key,
-    u_char *signature, int signaturelen,
-    u_char *data, int datalen)
+    u_char *signature, u_int signaturelen,
+    u_char *data, u_int datalen)
 {
        if (signaturelen == 0)
                return -1;
diff --git a/key.h b/key.h
index 00eebb7f1a10b87eb2faf1ff3d3588af7d13bf53..a2257731aef55cd9170262e0d0537e79a4745098 100644 (file)
--- a/key.h
+++ b/key.h
@@ -1,4 +1,4 @@
-/*     $OpenBSD: key.h,v 1.17 2001/09/17 19:27:15 stevesk Exp $        */
+/*     $OpenBSD: key.h,v 1.18 2002/02/24 19:14:59 markus Exp $ */
 
 /*
  * Copyright (c) 2000, 2001 Markus Friedl.  All rights reserved.
@@ -74,7 +74,7 @@ int    key_to_blob(Key *, u_char **, u_int *);
 char   *key_ssh_name(Key *);
 int     key_names_valid2(const char *);
 
-int     key_sign(Key *, u_char **, int *, u_char *, int);
-int     key_verify(Key *, u_char *, int, u_char *, int);
+int     key_sign(Key *, u_char **, u_int *, u_char *, u_int);
+int     key_verify(Key *, u_char *, u_int, u_char *, u_int);
 
 #endif
index b81b8347d275504dc9ddb54761d525975d1f3c55..e7aa6413412479086670b19b83fe24e09f53c532 100644 (file)
--- a/ssh-dss.c
+++ b/ssh-dss.c
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh-dss.c,v 1.12 2002/01/25 21:42:11 markus Exp $");
+RCSID("$OpenBSD: ssh-dss.c,v 1.13 2002/02/24 19:14:59 markus Exp $");
 
 #include <openssl/bn.h>
 #include <openssl/evp.h>
@@ -42,8 +42,8 @@ RCSID("$OpenBSD: ssh-dss.c,v 1.12 2002/01/25 21:42:11 markus Exp $");
 int
 ssh_dss_sign(
     Key *key,
-    u_char **sigp, int *lenp,
-    u_char *data, int datalen)
+    u_char **sigp, u_int *lenp,
+    u_char *data, u_int datalen)
 {
        DSA_SIG *sig;
        EVP_MD *evp_md = EVP_sha1();
@@ -106,8 +106,8 @@ ssh_dss_sign(
 int
 ssh_dss_verify(
     Key *key,
-    u_char *signature, int signaturelen,
-    u_char *data, int datalen)
+    u_char *signature, u_int signaturelen,
+    u_char *data, u_int datalen)
 {
        DSA_SIG *sig;
        EVP_MD *evp_md = EVP_sha1();
index 0613acba31fe3cbeb1b889323d23378055026a6b..94961b1e8ca7badd47fc9d8cbc7bd71ff2e8718a 100644 (file)
--- a/ssh-dss.h
+++ b/ssh-dss.h
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ssh-dss.h,v 1.5 2001/06/26 17:27:25 markus Exp $      */
+/*     $OpenBSD: ssh-dss.h,v 1.6 2002/02/24 19:14:59 markus Exp $      */
 
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
@@ -26,7 +26,7 @@
 #ifndef DSA_H
 #define DSA_H
 
-int     ssh_dss_sign(Key *, u_char **, int *, u_char *, int);
-int     ssh_dss_verify(Key *, u_char *, int, u_char *, int);
+int     ssh_dss_sign(Key *, u_char **, u_int *, u_char *, u_int);
+int     ssh_dss_verify(Key *, u_char *, u_int, u_char *, u_int);
 
 #endif
index ddd03ff5dba81d966c59f38d3eae4a5ebf89c821..4560a3ffe50d6084311d04150d8cfc648397a5db 100644 (file)
@@ -12,7 +12,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh-keygen.c,v 1.92 2002/02/16 20:40:08 stevesk Exp $");
+RCSID("$OpenBSD: ssh-keygen.c,v 1.93 2002/02/24 19:14:59 markus Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/pem.h>
@@ -196,7 +196,7 @@ buffer_get_bignum_bits(Buffer *b, BIGNUM *value)
 }
 
 static Key *
-do_convert_private_ssh2_from_blob(u_char *blob, int blen)
+do_convert_private_ssh2_from_blob(u_char *blob, u_int blen)
 {
        Buffer b;
        Key *key = NULL;
index c4339b95bd12d3c5cc66436203afbfbc921cfcdf..8e79d4e1d310749269e80341b258c0155de08610 100644 (file)
--- a/ssh-rsa.c
+++ b/ssh-rsa.c
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: ssh-rsa.c,v 1.15 2002/01/25 21:42:11 markus Exp $");
+RCSID("$OpenBSD: ssh-rsa.c,v 1.16 2002/02/24 19:14:59 markus Exp $");
 
 #include <openssl/evp.h>
 #include <openssl/err.h>
@@ -40,8 +40,8 @@ RCSID("$OpenBSD: ssh-rsa.c,v 1.15 2002/01/25 21:42:11 markus Exp $");
 int
 ssh_rsa_sign(
     Key *key,
-    u_char **sigp, int *lenp,
-    u_char *data, int datalen)
+    u_char **sigp, u_int *lenp,
+    u_char *data, u_int datalen)
 {
        const EVP_MD *evp_md;
        EVP_MD_CTX md;
@@ -110,8 +110,8 @@ ssh_rsa_sign(
 int
 ssh_rsa_verify(
     Key *key,
-    u_char *signature, int signaturelen,
-    u_char *data, int datalen)
+    u_char *signature, u_int signaturelen,
+    u_char *data, u_int datalen)
 {
        Buffer b;
        const EVP_MD *evp_md;
index 11d355d583c9550984ae52877ce1d2e2c8209be4..7177a3f921132f296c33e1affff2c6d311cb7dcb 100644 (file)
--- a/ssh-rsa.h
+++ b/ssh-rsa.h
@@ -1,4 +1,4 @@
-/*     $OpenBSD: ssh-rsa.h,v 1.5 2001/06/26 17:27:25 markus Exp $      */
+/*     $OpenBSD: ssh-rsa.h,v 1.6 2002/02/24 19:14:59 markus Exp $      */
 
 /*
  * Copyright (c) 2000 Markus Friedl.  All rights reserved.
@@ -26,7 +26,7 @@
 #ifndef SSH_RSA_H
 #define SSH_RSA_H
 
-int     ssh_rsa_sign(Key *, u_char **, int *, u_char *, int);
-int     ssh_rsa_verify(Key *, u_char *, int, u_char *, int);
+int     ssh_rsa_sign(Key *, u_char **, u_int *, u_char *, u_int);
+int     ssh_rsa_verify(Key *, u_char *, u_int, u_char *, u_int);
 
 #endif
index ea8cfa6da2774561a8f362de0c4cd52e4d81f9e4..374eab570302c8d1ec4871c1c4e0ad86e74017e6 100644 (file)
@@ -23,7 +23,7 @@
  */
 
 #include "includes.h"
-RCSID("$OpenBSD: sshconnect2.c,v 1.95 2002/02/03 17:59:23 markus Exp $");
+RCSID("$OpenBSD: sshconnect2.c,v 1.96 2002/02/24 19:14:59 markus Exp $");
 
 #include "ssh.h"
 #include "ssh2.h"
@@ -138,7 +138,7 @@ typedef struct Authmethod Authmethod;
 
 typedef int sign_cb_fn(
     Authctxt *authctxt, Key *key,
-    u_char **sigp, int *lenp, u_char *data, int datalen);
+    u_char **sigp, u_int *lenp, u_char *data, u_int datalen);
 
 struct Authctxt {
        const char *server_user;
@@ -353,8 +353,10 @@ input_userauth_pk_ok(int type, u_int32_t seq, void *ctxt)
        Authctxt *authctxt = ctxt;
        Key *key = NULL;
        Buffer b;
-       int pktype, alen, blen, sent = 0;
-       char *pkalg, *pkblob, *fp;
+       int pktype, sent = 0;
+       u_int alen, blen;
+       char *pkalg, *fp;
+       u_char *pkblob;
 
        if (authctxt == NULL)
                fatal("input_userauth_pk_ok: no authentication context");
@@ -480,7 +482,7 @@ sign_and_send_pubkey(Authctxt *authctxt, Key *k, sign_cb_fn *sign_callback)
 {
        Buffer b;
        u_char *blob, *signature;
-       int bloblen, slen;
+       u_int bloblen, slen;
        int skip = 0;
        int ret = -1;
        int have_sig = 1;
@@ -632,8 +634,8 @@ load_identity_file(char *filename)
 }
 
 static int
-identity_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp,
-    u_char *data, int datalen)
+identity_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, u_int *lenp,
+    u_char *data, u_int datalen)
 {
        Key *private;
        int idx, ret;
@@ -655,15 +657,15 @@ identity_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp,
 }
 
 static int
-agent_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp,
-    u_char *data, int datalen)
+agent_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, u_int *lenp,
+    u_char *data, u_int datalen)
 {
        return ssh_agent_sign(authctxt->agent, key, sigp, lenp, data, datalen);
 }
 
 static int
-key_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, int *lenp,
-    u_char *data, int datalen)
+key_sign_cb(Authctxt *authctxt, Key *key, u_char **sigp, u_int *lenp,
+    u_char *data, u_int datalen)
 {
        return key_sign(key, sigp, lenp, data, datalen);
 }
This page took 0.099049 seconds and 5 git commands to generate.