- 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()
*/
#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>
{
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;
{
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;
return (host_status == HOST_OK);
}
-
*/
#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>
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;
* 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
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 */
*/
#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>
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) {
*/
#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>
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();
*/
#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>
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");
* 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>
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;
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' */
}
} 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);
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:
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;
-/* $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.
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
*/
#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>
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();
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();
-/* $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.
#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
*/
#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>
}
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;
*/
#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>
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;
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;
-/* $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.
#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
*/
#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"
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;
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");
{
Buffer b;
u_char *blob, *signature;
- int bloblen, slen;
+ u_int bloblen, slen;
int skip = 0;
int ret = -1;
int have_sig = 1;
}
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;
}
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);
}