summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rc4
diff options
context:
space:
mode:
authormarkus <>2003-05-12 02:18:40 +0000
committermarkus <>2003-05-12 02:18:40 +0000
commitd4fcd82bb7f6d603bd61e19a81ba97337b89dfca (patch)
treed52e3a0f1f08f65ad283027e560e17ed0d720462 /src/lib/libcrypto/rc4
parent582bbd139cd2afd58d10dc051c5b0b989b441074 (diff)
downloadopenbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.tar.gz
openbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.tar.bz2
openbsd-d4fcd82bb7f6d603bd61e19a81ba97337b89dfca.zip
merge 0.9.7b with local changes; crank majors for libssl/libcrypto
Diffstat (limited to 'src/lib/libcrypto/rc4')
-rw-r--r--src/lib/libcrypto/rc4/Makefile.ssl14
-rw-r--r--src/lib/libcrypto/rc4/rc4.c4
-rw-r--r--src/lib/libcrypto/rc4/rc4test.c4
3 files changed, 9 insertions, 13 deletions
diff --git a/src/lib/libcrypto/rc4/Makefile.ssl b/src/lib/libcrypto/rc4/Makefile.ssl
index 6e5bbf9894..9f9e16068f 100644
--- a/src/lib/libcrypto/rc4/Makefile.ssl
+++ b/src/lib/libcrypto/rc4/Makefile.ssl
@@ -52,14 +52,8 @@ lib: $(LIBOBJ)
52 @touch lib 52 @touch lib
53 53
54# elf 54# elf
55asm/rx86-elf.o: asm/rx86unix.cpp 55asm/rx86-elf.s: asm/rc4-586.pl ../perlasm/x86asm.pl
56 $(CPP) -DELF -x c asm/rx86unix.cpp | as -o asm/rx86-elf.o 56 (cd asm; $(PERL) rc4-586.pl elf $(CFLAGS) > rx86-elf.s)
57
58# solaris
59asm/rx86-sol.o: asm/rx86unix.cpp
60 $(CC) -E -DSOL asm/rx86unix.cpp | sed 's/^#.*//' > asm/rx86-sol.s
61 as -o asm/rx86-sol.o asm/rx86-sol.s
62 rm -f asm/rx86-sol.s
63 57
64# a.out 58# a.out
65asm/rx86-out.o: asm/rx86unix.cpp 59asm/rx86-out.o: asm/rx86unix.cpp
@@ -97,14 +91,14 @@ lint:
97 lint -DLINT $(INCLUDES) $(SRC)>fluff 91 lint -DLINT $(INCLUDES) $(SRC)>fluff
98 92
99depend: 93depend:
100 $(MAKEDEPEND) $(CFLAG) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC) 94 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
101 95
102dclean: 96dclean:
103 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new 97 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
104 mv -f Makefile.new $(MAKEFILE) 98 mv -f Makefile.new $(MAKEFILE)
105 99
106clean: 100clean:
107 rm -f asm/rx86unix.cpp *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o 101 rm -f asm/rx86unix.cpp asm/*-elf.* *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
108 102
109# DO NOT DELETE THIS LINE -- make depend depends on it. 103# DO NOT DELETE THIS LINE -- make depend depends on it.
110 104
diff --git a/src/lib/libcrypto/rc4/rc4.c b/src/lib/libcrypto/rc4/rc4.c
index c2165b0b75..b39c070292 100644
--- a/src/lib/libcrypto/rc4/rc4.c
+++ b/src/lib/libcrypto/rc4/rc4.c
@@ -155,7 +155,7 @@ bad:
155 i=EVP_read_pw_string(buf,BUFSIZ,"Enter RC4 password:",0); 155 i=EVP_read_pw_string(buf,BUFSIZ,"Enter RC4 password:",0);
156 if (i != 0) 156 if (i != 0)
157 { 157 {
158 memset(buf,0,BUFSIZ); 158 OPENSSL_cleanse(buf,BUFSIZ);
159 fprintf(stderr,"bad password read\n"); 159 fprintf(stderr,"bad password read\n");
160 exit(1); 160 exit(1);
161 } 161 }
@@ -163,7 +163,7 @@ bad:
163 } 163 }
164 164
165 EVP_Digest((unsigned char *)keystr,(unsigned long)strlen(keystr),md,NULL,EVP_md5()); 165 EVP_Digest((unsigned char *)keystr,(unsigned long)strlen(keystr),md,NULL,EVP_md5());
166 memset(keystr,0,strlen(keystr)); 166 OPENSSL_cleanse(keystr,strlen(keystr));
167 RC4_set_key(&key,MD5_DIGEST_LENGTH,md); 167 RC4_set_key(&key,MD5_DIGEST_LENGTH,md);
168 168
169 for(;;) 169 for(;;)
diff --git a/src/lib/libcrypto/rc4/rc4test.c b/src/lib/libcrypto/rc4/rc4test.c
index a28d457c8d..b9d8f20975 100644
--- a/src/lib/libcrypto/rc4/rc4test.c
+++ b/src/lib/libcrypto/rc4/rc4test.c
@@ -60,6 +60,8 @@
60#include <stdlib.h> 60#include <stdlib.h>
61#include <string.h> 61#include <string.h>
62 62
63#include "../e_os.h"
64
63#ifdef OPENSSL_NO_RC4 65#ifdef OPENSSL_NO_RC4
64int main(int argc, char *argv[]) 66int main(int argc, char *argv[])
65{ 67{
@@ -195,7 +197,7 @@ int main(int argc, char *argv[])
195 } 197 }
196 } 198 }
197 printf("done\n"); 199 printf("done\n");
198 exit(err); 200 EXIT(err);
199 return(0); 201 return(0);
200 } 202 }
201#endif 203#endif