summaryrefslogtreecommitdiff
path: root/key.c
diff options
context:
space:
mode:
authorBen Lindstrom <mouring@eviladmin.org>2000-12-22 01:43:59 +0000
committerBen Lindstrom <mouring@eviladmin.org>2000-12-22 01:43:59 +0000
commit46c162204b5a6f7471525c2f75cb2c607c88b83f (patch)
tree9041b006ab612c18bdb16b606601839a00ca5b2c /key.c
parenta074feb65d6f1fcad02e80b751e2287fd6230b09 (diff)
One way to massive patch. <sigh> It compiles and works under Linux..
And I think I have all the bits right from the OpenBSD tree. 20001222 - Updated RCSID for pty.c - (bal) OpenBSD CVS Updates: - markus@cvs.openbsd.org 2000/12/21 15:10:16 [auth-rh-rsa.c hostfile.c hostfile.h sshconnect.c] print keyfile:line for changed hostkeys, for deraadt@, ok deraadt@ - markus@cvs.openbsd.org 2000/12/20 19:26:56 [authfile.c] allow ssh -i userkey for root - markus@cvs.openbsd.org 2000/12/20 19:37:21 [authfd.c authfd.h kex.c sshconnect2.c sshd.c uidswap.c uidswap.h] fix prototypes; from stevesk@pobox.com - markus@cvs.openbsd.org 2000/12/20 19:32:08 [sshd.c] init pointer to NULL; report from Jan.Ivan@cern.ch - markus@cvs.openbsd.org 2000/12/19 23:17:54 [auth-krb4.c auth-options.c auth-options.h auth-rhosts.c auth-rsa.c auth1.c auth2-skey.c auth2.c authfd.c authfd.h authfile.c bufaux.c bufaux.h buffer.c canohost.c channels.c clientloop.c compress.c crc32.c deattack.c getput.h hmac.c hmac.h hostfile.c kex.c kex.h key.c key.h log.c login.c match.c match.h mpaux.c mpaux.h packet.c packet.h radix.c readconf.c rsa.c scp.c servconf.c servconf.h serverloop.c session.c sftp-server.c ssh-agent.c ssh-dss.c ssh-dss.h ssh-keygen.c ssh-keyscan.c ssh-rsa.c ssh-rsa.h ssh.c ssh.h uuencode.c uuencode.h sshconnect1.c sshconnect2.c sshd.c tildexpand.c] replace 'unsigned bla' with 'u_bla' everywhere. also replace 'char unsigned' with u_char.
Diffstat (limited to 'key.c')
-rw-r--r--key.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/key.c b/key.c
index a6b25b7ae..f9474b16b 100644
--- a/key.c
+++ b/key.c
@@ -46,7 +46,7 @@
#include "buffer.h"
#include "bufaux.h"
-RCSID("$OpenBSD: key.c,v 1.12 2000/11/12 19:50:37 markus Exp $");
+RCSID("$OpenBSD: key.c,v 1.13 2000/12/19 23:17:56 markus Exp $");
Key *
key_new(int type)
@@ -163,7 +163,7 @@ char *
key_fingerprint(Key *k)
{
static char retval[(EVP_MAX_MD_SIZE+1)*3];
- unsigned char *blob = NULL;
+ u_char *blob = NULL;
int len = 0;
int nlen, elen;
@@ -190,7 +190,7 @@ key_fingerprint(Key *k)
}
if (blob != NULL) {
int i;
- unsigned char digest[EVP_MAX_MD_SIZE];
+ u_char digest[EVP_MAX_MD_SIZE];
EVP_MD *md = EVP_md5();
EVP_MD_CTX ctx;
EVP_DigestInit(&ctx, md);
@@ -273,7 +273,7 @@ key_read(Key *ret, char **cpp)
char *cp, *space;
int len, n, type;
u_int bits;
- unsigned char *blob;
+ u_char *blob;
cp = *cpp;
@@ -380,7 +380,7 @@ int
key_write(Key *key, FILE *f)
{
int success = 0;
- unsigned int bits = 0;
+ u_int bits = 0;
if (key->type == KEY_RSA1 && key->rsa != NULL) {
/* size of modulus 'n' */
@@ -395,7 +395,7 @@ 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;
- unsigned char *blob, *uu;
+ u_char *blob, *uu;
key_to_blob(key, &blob, &len);
uu = xmalloc(2*len);
n = uuencode(blob, len, uu, 2*len);
@@ -452,7 +452,7 @@ key_size(Key *k){
}
RSA *
-rsa_generate_private_key(unsigned int bits)
+rsa_generate_private_key(u_int bits)
{
RSA *private;
private = RSA_generate_key(bits, 35, NULL, NULL);
@@ -462,7 +462,7 @@ rsa_generate_private_key(unsigned int bits)
}
DSA*
-dsa_generate_private_key(unsigned int bits)
+dsa_generate_private_key(u_int bits)
{
DSA *private = DSA_generate_parameters(bits, NULL, 0, NULL, NULL, NULL, NULL);
if (private == NULL)
@@ -475,7 +475,7 @@ dsa_generate_private_key(unsigned int bits)
}
Key *
-key_generate(int type, unsigned int bits)
+key_generate(int type, u_int bits)
{
Key *k = key_new(KEY_UNSPEC);
switch (type) {
@@ -587,11 +587,11 @@ key_from_blob(char *blob, int blen)
}
int
-key_to_blob(Key *key, unsigned char **blobp, unsigned int *lenp)
+key_to_blob(Key *key, u_char **blobp, u_int *lenp)
{
Buffer b;
int len;
- unsigned char *buf;
+ u_char *buf;
if (key == NULL) {
error("key_to_blob: key == NULL");
@@ -630,8 +630,8 @@ key_to_blob(Key *key, unsigned char **blobp, unsigned int *lenp)
int
key_sign(
Key *key,
- unsigned char **sigp, int *lenp,
- unsigned char *data, int datalen)
+ u_char **sigp, int *lenp,
+ u_char *data, int datalen)
{
switch(key->type){
case KEY_DSA:
@@ -650,8 +650,8 @@ key_sign(
int
key_verify(
Key *key,
- unsigned char *signature, int signaturelen,
- unsigned char *data, int datalen)
+ u_char *signature, int signaturelen,
+ u_char *data, int datalen)
{
switch(key->type){
case KEY_DSA: