summaryrefslogtreecommitdiff
path: root/lib/libcrypto/bf
diff options
context:
space:
mode:
authorMarkus Friedl <markus@cvs.openbsd.org>2003-05-12 02:18:41 +0000
committerMarkus Friedl <markus@cvs.openbsd.org>2003-05-12 02:18:41 +0000
commitb47e6f30e82ff649c06cdfcf587a4ad9d127a4f5 (patch)
treef98b2f00f52dd4fd004708bd26d63f3c24a78355 /lib/libcrypto/bf
parentf97744c656f2a5c7d4e42bcaba08dbe146a49425 (diff)
merge 0.9.7b with local changes; crank majors for libssl/libcrypto
Diffstat (limited to 'lib/libcrypto/bf')
-rw-r--r--lib/libcrypto/bf/Makefile.ssl14
-rw-r--r--lib/libcrypto/bf/bftest.c10
2 files changed, 10 insertions, 14 deletions
diff --git a/lib/libcrypto/bf/Makefile.ssl b/lib/libcrypto/bf/Makefile.ssl
index 079f7e860c8..7dfdf9d871e 100644
--- a/lib/libcrypto/bf/Makefile.ssl
+++ b/lib/libcrypto/bf/Makefile.ssl
@@ -49,14 +49,8 @@ lib: $(LIBOBJ)
@touch lib
# elf
-asm/bx86-elf.o: asm/bx86unix.cpp
- $(CPP) -DELF -x c asm/bx86unix.cpp | as -o asm/bx86-elf.o
-
-# solaris
-asm/bx86-sol.o: asm/bx86unix.cpp
- $(CC) -E -DSOL asm/bx86unix.cpp | sed 's/^#.*//' > asm/bx86-sol.s
- as -o asm/bx86-sol.o asm/bx86-sol.s
- rm -f asm/bx86-sol.s
+asm/bx86-elf.s: asm/bf-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl
+ (cd asm; $(PERL) bf-586.pl elf $(CFLAGS) $(PROCESSOR) > bx86-elf.s)
# a.out
asm/bx86-out.o: asm/bx86unix.cpp
@@ -96,14 +90,14 @@ lint:
lint -DLINT $(INCLUDES) $(SRC)>fluff
depend:
- $(MAKEDEPEND) $(CFLAG) $(INCLUDES) $(DEPFLAG) $(PROGS) $(LIBSRC)
+ $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
dclean:
$(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
mv -f Makefile.new $(MAKEFILE)
clean:
- rm -f asm/bx86unix.cpp *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
+ rm -f asm/bx86unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
# DO NOT DELETE THIS LINE -- make depend depends on it.
diff --git a/lib/libcrypto/bf/bftest.c b/lib/libcrypto/bf/bftest.c
index 09895f25424..24d526b14bd 100644
--- a/lib/libcrypto/bf/bftest.c
+++ b/lib/libcrypto/bf/bftest.c
@@ -63,6 +63,8 @@
#include <string.h>
#include <stdlib.h>
+#include "../e_os.h"
+
#ifdef OPENSSL_NO_BF
int main(int argc, char *argv[])
{
@@ -275,7 +277,7 @@ int main(int argc, char *argv[])
else
ret=test();
- exit(ret);
+ EXIT(ret);
return(0);
}
@@ -454,9 +456,9 @@ static int test(void)
len=strlen(cbc_data)+1;
BF_set_key(&key,16,cbc_key);
- memset(cbc_in,0,40);
- memset(cbc_out,0,40);
- memcpy(iv,cbc_iv,8);
+ memset(cbc_in,0,sizeof cbc_in);
+ memset(cbc_out,0,sizeof cbc_out);
+ memcpy(iv,cbc_iv,sizeof iv);
BF_cbc_encrypt((unsigned char *)cbc_data,cbc_out,len,
&key,iv,BF_ENCRYPT);
if (memcmp(cbc_out,cbc_ok,32) != 0)