diff options
author | markus <> | 2002-09-05 12:51:52 +0000 |
---|---|---|
committer | markus <> | 2002-09-05 12:51:52 +0000 |
commit | 5514995a9d5ed91db089875adb509c7781357c0e (patch) | |
tree | 2484410a46ba6c05ef94c253da36fbceef990b64 /src/lib/libcrypto/rc4/rc4.c | |
parent | fd9566423b542798f5c8b06e68101a9ea5bb9885 (diff) | |
download | openbsd-5514995a9d5ed91db089875adb509c7781357c0e.tar.gz openbsd-5514995a9d5ed91db089875adb509c7781357c0e.tar.bz2 openbsd-5514995a9d5ed91db089875adb509c7781357c0e.zip |
import openssl-0.9.7-beta1
Diffstat (limited to 'src/lib/libcrypto/rc4/rc4.c')
-rw-r--r-- | src/lib/libcrypto/rc4/rc4.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/lib/libcrypto/rc4/rc4.c b/src/lib/libcrypto/rc4/rc4.c index 127e8a5093..c2165b0b75 100644 --- a/src/lib/libcrypto/rc4/rc4.c +++ b/src/lib/libcrypto/rc4/rc4.c | |||
@@ -59,7 +59,7 @@ | |||
59 | #include <stdio.h> | 59 | #include <stdio.h> |
60 | #include <stdlib.h> | 60 | #include <stdlib.h> |
61 | #include <string.h> | 61 | #include <string.h> |
62 | #include "rc4.h" | 62 | #include <openssl/rc4.h> |
63 | 63 | ||
64 | char *usage[]={ | 64 | char *usage[]={ |
65 | "usage: rc4 args\n", | 65 | "usage: rc4 args\n", |
@@ -70,9 +70,7 @@ char *usage[]={ | |||
70 | NULL | 70 | NULL |
71 | }; | 71 | }; |
72 | 72 | ||
73 | int main(argc, argv) | 73 | int main(int argc, char *argv[]) |
74 | int argc; | ||
75 | char *argv[]; | ||
76 | { | 74 | { |
77 | FILE *in=NULL,*out=NULL; | 75 | FILE *in=NULL,*out=NULL; |
78 | char *infile=NULL,*outfile=NULL,*keystr=NULL; | 76 | char *infile=NULL,*outfile=NULL,*keystr=NULL; |
@@ -115,7 +113,7 @@ char *argv[]; | |||
115 | { | 113 | { |
116 | bad: | 114 | bad: |
117 | for (pp=usage; (*pp != NULL); pp++) | 115 | for (pp=usage; (*pp != NULL); pp++) |
118 | fprintf(stderr,*pp); | 116 | fprintf(stderr,"%s",*pp); |
119 | exit(1); | 117 | exit(1); |
120 | } | 118 | } |
121 | 119 | ||
@@ -143,7 +141,7 @@ bad: | |||
143 | } | 141 | } |
144 | } | 142 | } |
145 | 143 | ||
146 | #ifdef MSDOS | 144 | #ifdef OPENSSL_SYS_MSDOS |
147 | /* This should set the file to binary mode. */ | 145 | /* This should set the file to binary mode. */ |
148 | { | 146 | { |
149 | #include <fcntl.h> | 147 | #include <fcntl.h> |
@@ -164,7 +162,7 @@ bad: | |||
164 | keystr=buf; | 162 | keystr=buf; |
165 | } | 163 | } |
166 | 164 | ||
167 | MD5((unsigned char *)keystr,(unsigned long)strlen(keystr),md); | 165 | EVP_Digest((unsigned char *)keystr,(unsigned long)strlen(keystr),md,NULL,EVP_md5()); |
168 | memset(keystr,0,strlen(keystr)); | 166 | memset(keystr,0,strlen(keystr)); |
169 | RC4_set_key(&key,MD5_DIGEST_LENGTH,md); | 167 | RC4_set_key(&key,MD5_DIGEST_LENGTH,md); |
170 | 168 | ||