summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/sha
diff options
context:
space:
mode:
authordjm <>2005-04-29 05:37:32 +0000
committerdjm <>2005-04-29 05:37:32 +0000
commit588543a0946f1dbf0f1dd5135f8f6447486dc183 (patch)
treef74e14f98abfec33221f0f2e15cc88a34a3df7e5 /src/lib/libcrypto/sha
parent00b426069b0dfa8f0d9b87308646e9684f45c515 (diff)
downloadopenbsd-588543a0946f1dbf0f1dd5135f8f6447486dc183.tar.gz
openbsd-588543a0946f1dbf0f1dd5135f8f6447486dc183.tar.bz2
openbsd-588543a0946f1dbf0f1dd5135f8f6447486dc183.zip
import of openssl-0.9.7g; tested on platforms from alpha to zaurus, ok deraadt@
Diffstat (limited to 'src/lib/libcrypto/sha')
-rw-r--r--src/lib/libcrypto/sha/Makefile127
-rw-r--r--src/lib/libcrypto/sha/shatest.c4
2 files changed, 129 insertions, 2 deletions
diff --git a/src/lib/libcrypto/sha/Makefile b/src/lib/libcrypto/sha/Makefile
new file mode 100644
index 0000000000..0426786aa0
--- /dev/null
+++ b/src/lib/libcrypto/sha/Makefile
@@ -0,0 +1,127 @@
1#
2# SSLeay/crypto/sha/Makefile
3#
4
5DIR= sha
6TOP= ../..
7CC= cc
8CPP= $(CC) -E
9INCLUDES=
10CFLAG=-g
11INSTALL_PREFIX=
12OPENSSLDIR= /usr/local/ssl
13INSTALLTOP=/usr/local/ssl
14MAKEDEPPROG= makedepend
15MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG)
16MAKEFILE= Makefile
17AR= ar r
18
19SHA1_ASM_OBJ=
20
21CFLAGS= $(INCLUDES) $(CFLAG)
22ASFLAGS= $(INCLUDES) $(ASFLAG)
23
24GENERAL=Makefile
25TEST=shatest.c sha1test.c
26APPS=
27
28LIB=$(TOP)/libcrypto.a
29LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c
30LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o $(SHA1_ASM_OBJ)
31
32SRC= $(LIBSRC)
33
34EXHEADER= sha.h
35HEADER= sha_locl.h $(EXHEADER)
36
37ALL= $(GENERAL) $(SRC) $(HEADER)
38
39top:
40 (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all)
41
42all: lib
43
44lib: $(LIBOBJ)
45 $(AR) $(LIB) $(LIBOBJ)
46 $(RANLIB) $(LIB) || echo Never mind.
47 @touch lib
48
49# elf
50asm/sx86-elf.s: asm/sha1-586.pl ../perlasm/x86asm.pl
51 (cd asm; $(PERL) sha1-586.pl elf $(CFLAGS) $(PROCESSOR) > sx86-elf.s)
52
53# a.out
54asm/sx86-out.o: asm/sx86unix.cpp
55 $(CPP) -DOUT asm/sx86unix.cpp | as -o asm/sx86-out.o
56
57# bsdi
58asm/sx86bsdi.o: asm/sx86unix.cpp
59 $(CPP) -DBSDI asm/sx86unix.cpp | sed 's/ :/:/' | as -o asm/sx86bsdi.o
60
61asm/sx86unix.cpp: asm/sha1-586.pl ../perlasm/x86asm.pl
62 (cd asm; $(PERL) sha1-586.pl cpp $(PROCESSOR) >sx86unix.cpp)
63
64asm/sha1-ia64.s: asm/sha1-ia64.pl
65 (cd asm; $(PERL) sha1-ia64.pl $(CFLAGS) ) > $@
66
67files:
68 $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO
69
70links:
71 @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER)
72 @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST)
73 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
74
75install:
76 @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
77 do \
78 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
79 chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \
80 done;
81
82tags:
83 ctags $(SRC)
84
85tests:
86
87lint:
88 lint -DLINT $(INCLUDES) $(SRC)>fluff
89
90depend:
91 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
92
93dclean:
94 $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new
95 mv -f Makefile.new $(MAKEFILE)
96
97clean:
98 rm -f asm/sx86unix.cpp asm/*-elf.* *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o
99
100# DO NOT DELETE THIS LINE -- make depend depends on it.
101
102sha1_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
103sha1_one.o: ../../include/openssl/opensslconf.h
104sha1_one.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
105sha1_one.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
106sha1_one.o: ../../include/openssl/symhacks.h sha1_one.c
107sha1dgst.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
108sha1dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
109sha1dgst.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
110sha1dgst.o: ../../include/openssl/opensslconf.h
111sha1dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
112sha1dgst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
113sha1dgst.o: ../../include/openssl/symhacks.h ../md32_common.h sha1dgst.c
114sha1dgst.o: sha_locl.h
115sha_dgst.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h
116sha_dgst.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
117sha_dgst.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h
118sha_dgst.o: ../../include/openssl/opensslconf.h
119sha_dgst.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
120sha_dgst.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
121sha_dgst.o: ../../include/openssl/symhacks.h ../md32_common.h sha_dgst.c
122sha_dgst.o: sha_locl.h
123sha_one.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h
124sha_one.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
125sha_one.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
126sha_one.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
127sha_one.o: sha_one.c
diff --git a/src/lib/libcrypto/sha/shatest.c b/src/lib/libcrypto/sha/shatest.c
index 5d2b1d3b1a..ff702aa53e 100644
--- a/src/lib/libcrypto/sha/shatest.c
+++ b/src/lib/libcrypto/sha/shatest.c
@@ -62,10 +62,10 @@
62 62
63#include "../e_os.h" 63#include "../e_os.h"
64 64
65#ifdef OPENSSL_NO_SHA 65#if defined(OPENSSL_NO_SHA) || defined(OPENSSL_NO_SHA0)
66int main(int argc, char *argv[]) 66int main(int argc, char *argv[])
67{ 67{
68 printf("No SHA support\n"); 68 printf("No SHA0 support\n");
69 return(0); 69 return(0);
70} 70}
71#else 71#else