diff options
author | peter <peter@FreeBSD.org> | 2001-05-17 03:13:00 +0000 |
---|---|---|
committer | peter <peter@FreeBSD.org> | 2001-05-17 03:13:00 +0000 |
commit | fdd845cf6b3322a1737ca96a600d97a354bcfc6e (patch) | |
tree | 109084ac0706f8ee5ec1436c7e1a08398706427d | |
parent | 5d8c7438667676e1a77feff99a50c98444bd8792 (diff) | |
download | FreeBSD-src-fdd845cf6b3322a1737ca96a600d97a354bcfc6e.zip FreeBSD-src-fdd845cf6b3322a1737ca96a600d97a354bcfc6e.tar.gz |
Fix the latest telnet breakage. Obviously this was never compiled.
-rw-r--r-- | contrib/telnet/libtelnet/pk.c | 8 | ||||
-rw-r--r-- | crypto/telnet/libtelnet/pk.c | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/contrib/telnet/libtelnet/pk.c b/contrib/telnet/libtelnet/pk.c index a4773ef..9fe5441 100644 --- a/contrib/telnet/libtelnet/pk.c +++ b/contrib/telnet/libtelnet/pk.c @@ -142,6 +142,8 @@ void getseed(seed, seedsize) seed[i] = (lrand48() & 0xff); } #else + int i; + srandomdev(); for (i = 0; i < seedsize; i++) { seed[i] = random() & 0xff; @@ -231,8 +233,7 @@ DesData *key; memset(buf,0,sizeof(buf)); deslen = ((strlen(in) + 7)/8)*8; des_key_sched(key, k); - des_cbc_encrypt((des_cblock *)in,(des_cblock *)buf,deslen, - k,&i,DES_ENCRYPT); + des_cbc_encrypt(in,buf,deslen, k,&i,DES_ENCRYPT); for (l=0,op=0;l<deslen;l++) { out[op++] = hextab[(buf[l] & 0xf0) >> 4]; out[op++] = hextab[(buf[l] & 0x0f)]; @@ -268,7 +269,6 @@ DesData *key; buf[l] = n1*16 +n2; } des_key_sched(key, k); - des_cbc_encrypt((des_cblock *)buf,(des_cblock *)out,strlen(in)/2, - k,&i,DES_DECRYPT); + des_cbc_encrypt(buf,out,strlen(in)/2, k,&i,DES_DECRYPT); out[strlen(in)/2] = '\0'; } diff --git a/crypto/telnet/libtelnet/pk.c b/crypto/telnet/libtelnet/pk.c index a4773ef..9fe5441 100644 --- a/crypto/telnet/libtelnet/pk.c +++ b/crypto/telnet/libtelnet/pk.c @@ -142,6 +142,8 @@ void getseed(seed, seedsize) seed[i] = (lrand48() & 0xff); } #else + int i; + srandomdev(); for (i = 0; i < seedsize; i++) { seed[i] = random() & 0xff; @@ -231,8 +233,7 @@ DesData *key; memset(buf,0,sizeof(buf)); deslen = ((strlen(in) + 7)/8)*8; des_key_sched(key, k); - des_cbc_encrypt((des_cblock *)in,(des_cblock *)buf,deslen, - k,&i,DES_ENCRYPT); + des_cbc_encrypt(in,buf,deslen, k,&i,DES_ENCRYPT); for (l=0,op=0;l<deslen;l++) { out[op++] = hextab[(buf[l] & 0xf0) >> 4]; out[op++] = hextab[(buf[l] & 0x0f)]; @@ -268,7 +269,6 @@ DesData *key; buf[l] = n1*16 +n2; } des_key_sched(key, k); - des_cbc_encrypt((des_cblock *)buf,(des_cblock *)out,strlen(in)/2, - k,&i,DES_DECRYPT); + des_cbc_encrypt(buf,out,strlen(in)/2, k,&i,DES_DECRYPT); out[strlen(in)/2] = '\0'; } |