summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bf
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bf')
-rw-r--r--src/lib/libcrypto/bf/Makefile.ssl14
-rw-r--r--src/lib/libcrypto/bf/bftest.c10
2 files changed, 10 insertions, 14 deletions
diff --git a/src/lib/libcrypto/bf/Makefile.ssl b/src/lib/libcrypto/bf/Makefile.ssl
index 079f7e860c..7dfdf9d871 100644
--- a/src/lib/libcrypto/bf/Makefile.ssl
+++ b/src/lib/libcrypto/bf/Makefile.ssl
@@ -49,14 +49,8 @@ lib: $(LIBOBJ)
49 @touch lib 49 @touch lib
50 50
51# elf 51# elf
52asm/bx86-elf.o: asm/bx86unix.cpp 52asm/bx86-elf.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
53 $(CPP) -DELF -x c asm/bx86unix.cpp | as -o asm/bx86-elf.o 53 (cd asm; $(PERL) bf-586.pl elf $(CFLAGS) $(PROCESSOR) > bx86-elf.s)
54
55# solaris
56asm/bx86-sol.o: asm/bx86unix.cpp
57 $(CC) -E -DSOL asm/bx86unix.cpp | sed 's/^#.*//' > asm/bx86-sol.s
58 as -o asm/bx86-sol.o asm/bx86-sol.s
59 rm -f asm/bx86-sol.s
60 54
61# a.out 55# a.out
62asm/bx86-out.o: asm/bx86unix.cpp 56asm/bx86-out.o: asm/bx86unix.cpp
@@ -96,14 +90,14 @@ lint:
96 lint -DLINT $(INCLUDES) $(SRC)>fluff 90 lint -DLINT $(INCLUDES) $(SRC)>fluff
97 91
98depend: 92depend:
99 $(MAKEDEPEND) $(CFLAG) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC) 93 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
100 94
101dclean: 95dclean:
102 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new 96 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
103 mv -f Makefile.new $(MAKEFILE) 97 mv -f Makefile.new $(MAKEFILE)
104 98
105clean: 99clean:
106 rm -f asm/bx86unix.cpp *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff 100 rm -f asm/bx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
107 101
108# DO NOT DELETE THIS LINE -- make depend depends on it. 102# DO NOT DELETE THIS LINE -- make depend depends on it.
109 103
diff --git a/src/lib/libcrypto/bf/bftest.c b/src/lib/libcrypto/bf/bftest.c
index 09895f2542..24d526b14b 100644
--- a/src/lib/libcrypto/bf/bftest.c
+++ b/src/lib/libcrypto/bf/bftest.c
@@ -63,6 +63,8 @@
63#include <string.h> 63#include <string.h>
64#include <stdlib.h> 64#include <stdlib.h>
65 65
66#include "../e_os.h"
67
66#ifdef OPENSSL_NO_BF 68#ifdef OPENSSL_NO_BF
67int main(int argc, char *argv[]) 69int main(int argc, char *argv[])
68{ 70{
@@ -275,7 +277,7 @@ int main(int argc, char *argv[])
275 else 277 else
276 ret=test(); 278 ret=test();
277 279
278 exit(ret); 280 EXIT(ret);
279 return(0); 281 return(0);
280 } 282 }
281 283
@@ -454,9 +456,9 @@ static int test(void)
454 len=strlen(cbc_data)+1; 456 len=strlen(cbc_data)+1;
455 457
456 BF_set_key(&key,16,cbc_key); 458 BF_set_key(&key,16,cbc_key);
457 memset(cbc_in,0,40); 459 memset(cbc_in,0,sizeof cbc_in);
458 memset(cbc_out,0,40); 460 memset(cbc_out,0,sizeof cbc_out);
459 memcpy(iv,cbc_iv,8); 461 memcpy(iv,cbc_iv,sizeof iv);
460 BF_cbc_encrypt((unsigned char *)cbc_data,cbc_out,len, 462 BF_cbc_encrypt((unsigned char *)cbc_data,cbc_out,len,
461 &key,iv,BF_ENCRYPT); 463 &key,iv,BF_ENCRYPT);
462 if (memcmp(cbc_out,cbc_ok,32) != 0) 464 if (memcmp(cbc_out,cbc_ok,32) != 0)