summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/rc4
diff options
context:
space:
mode:
authordjm <>2008-09-06 12:15:54 +0000
committerdjm <>2008-09-06 12:15:54 +0000
commitf519f07de9bfb123f2b32aa3965e6f73c8364b80 (patch)
treead353b318ee632f73212a174cffac9bb9e573b7c /src/lib/libcrypto/rc4
parent89b182c5db7ea802edfc3ee734b4899b43e13e09 (diff)
parentf1625f274acf5dcd5601f6cb5e29e233b2a441a3 (diff)
downloadopenbsd-f519f07de9bfb123f2b32aa3965e6f73c8364b80.tar.gz
openbsd-f519f07de9bfb123f2b32aa3965e6f73c8364b80.tar.bz2
openbsd-f519f07de9bfb123f2b32aa3965e6f73c8364b80.zip
This commit was generated by cvs2git to track changes on a CVS vendor
branch.
Diffstat (limited to 'src/lib/libcrypto/rc4')
-rw-r--r--src/lib/libcrypto/rc4/Makefile63
-rw-r--r--src/lib/libcrypto/rc4/asm/rc4-ia64.S5
2 files changed, 27 insertions, 41 deletions
diff --git a/src/lib/libcrypto/rc4/Makefile b/src/lib/libcrypto/rc4/Makefile
index 20d078ec87..187ed5c668 100644
--- a/src/lib/libcrypto/rc4/Makefile
+++ b/src/lib/libcrypto/rc4/Makefile
@@ -8,23 +8,13 @@ CC= cc
8CPP= $(CC) -E 8CPP= $(CC) -E
9INCLUDES= 9INCLUDES=
10CFLAG=-g 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 11AR= ar r
18 12
19RC4_ENC=rc4_enc.o 13RC4_ENC=rc4_enc.o rc4_skey.o
20# or use
21#RC4_ENC=asm/rx86-elf.o
22#RC4_ENC=asm/rx86-out.o
23#RC4_ENC=asm/rx86-sol.o
24#RC4_ENC=asm/rx86bdsi.o
25 14
26CFLAGS= $(INCLUDES) $(CFLAG) 15CFLAGS= $(INCLUDES) $(CFLAG)
27ASFLAGS= $(INCLUDES) $(ASFLAG) 16ASFLAGS= $(INCLUDES) $(ASFLAG)
17AFLAGS= $(ASFLAGS)
28 18
29GENERAL=Makefile 19GENERAL=Makefile
30TEST=rc4test.c 20TEST=rc4test.c
@@ -32,7 +22,7 @@ APPS=
32 22
33LIB=$(TOP)/libcrypto.a 23LIB=$(TOP)/libcrypto.a
34LIBSRC=rc4_skey.c rc4_enc.c 24LIBSRC=rc4_skey.c rc4_enc.c
35LIBOBJ=rc4_skey.o $(RC4_ENC) 25LIBOBJ=$(RC4_ENC)
36 26
37SRC= $(LIBSRC) 27SRC= $(LIBSRC)
38 28
@@ -51,24 +41,19 @@ lib: $(LIBOBJ)
51 $(RANLIB) $(LIB) || echo Never mind. 41 $(RANLIB) $(LIB) || echo Never mind.
52 @touch lib 42 @touch lib
53 43
54# elf 44# ELF
55asm/rx86-elf.s: asm/rc4-586.pl ../perlasm/x86asm.pl 45rx86-elf.s: asm/rc4-586.pl ../perlasm/x86asm.pl
56 (cd asm; $(PERL) rc4-586.pl elf $(CFLAGS) > rx86-elf.s) 46 (cd asm; $(PERL) rc4-586.pl elf $(CFLAGS) > ../$@)
57 47# COFF
48rx86-cof.s: asm/rc4-586.pl ../perlasm/x86asm.pl
49 (cd asm; $(PERL) rc4-586.pl coff $(CFLAGS) > ../$@)
58# a.out 50# a.out
59asm/rx86-out.o: asm/rx86unix.cpp 51rx86-out.s: asm/rc4-586.pl ../perlasm/x86asm.pl
60 $(CPP) -DOUT asm/rx86unix.cpp | as -o asm/rx86-out.o 52 (cd asm; $(PERL) rc4-586.pl a.out $(CFLAGS) > ../$@)
61
62# bsdi
63asm/rx86bsdi.o: asm/rx86unix.cpp
64 $(CPP) -DBSDI asm/rx86unix.cpp | sed 's/ :/:/' | as -o asm/rx86bsdi.o
65
66asm/rx86unix.cpp: asm/rc4-586.pl ../perlasm/x86asm.pl
67 (cd asm; $(PERL) rc4-586.pl cpp >rx86unix.cpp)
68 53
69asm/rc4-x86_64.s: asm/rc4-x86_64.pl; $(PERL) asm/rc4-x86_64.pl $@ 54rc4-x86_64.s: asm/rc4-x86_64.pl; $(PERL) asm/rc4-x86_64.pl $@
70 55
71asm/rc4-ia64.s: asm/rc4-ia64.S 56rc4-ia64.s: asm/rc4-ia64.S
72 @case `awk '/^#define RC4_INT/{print$$NF}' $(TOP)/include/openssl/opensslconf.h` in \ 57 @case `awk '/^#define RC4_INT/{print$$NF}' $(TOP)/include/openssl/opensslconf.h` in \
73 int) set -x; $(CC) $(CFLAGS) -DSZ=4 -E asm/rc4-ia64.S > $@ ;; \ 58 int) set -x; $(CC) $(CFLAGS) -DSZ=4 -E asm/rc4-ia64.S > $@ ;; \
74 char) set -x; $(CC) $(CFLAGS) -DSZ=1 -E asm/rc4-ia64.S > $@ ;; \ 59 char) set -x; $(CC) $(CFLAGS) -DSZ=1 -E asm/rc4-ia64.S > $@ ;; \
@@ -84,6 +69,7 @@ links:
84 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) 69 @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS)
85 70
86install: 71install:
72 @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile...
87 @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ 73 @headerlist="$(EXHEADER)"; for i in $$headerlist ; \
88 do \ 74 do \
89 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ 75 (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \
@@ -99,6 +85,7 @@ lint:
99 lint -DLINT $(INCLUDES) $(SRC)>fluff 85 lint -DLINT $(INCLUDES) $(SRC)>fluff
100 86
101depend: 87depend:
88 @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile...
102 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) 89 $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC)
103 90
104dclean: 91dclean:
@@ -106,7 +93,7 @@ dclean:
106 mv -f Makefile.new $(MAKEFILE) 93 mv -f Makefile.new $(MAKEFILE)
107 94
108clean: 95clean:
109 rm -f asm/rx86unix.cpp asm/*-elf.* *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o 96 rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff
110 97
111# DO NOT DELETE THIS LINE -- make depend depends on it. 98# DO NOT DELETE THIS LINE -- make depend depends on it.
112 99
@@ -114,15 +101,15 @@ rc4_enc.o: ../../e_os.h ../../include/openssl/bio.h
114rc4_enc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 101rc4_enc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
115rc4_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 102rc4_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
116rc4_enc.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h 103rc4_enc.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
117rc4_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/rc4.h 104rc4_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
118rc4_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 105rc4_enc.o: ../../include/openssl/rc4.h ../../include/openssl/safestack.h
119rc4_enc.o: ../../include/openssl/symhacks.h ../cryptlib.h rc4_enc.c rc4_locl.h 106rc4_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
107rc4_enc.o: ../cryptlib.h rc4_enc.c rc4_locl.h
120rc4_skey.o: ../../e_os.h ../../include/openssl/bio.h 108rc4_skey.o: ../../e_os.h ../../include/openssl/bio.h
121rc4_skey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h 109rc4_skey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
122rc4_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 110rc4_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
123rc4_skey.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h 111rc4_skey.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h
124rc4_skey.o: ../../include/openssl/opensslconf.h 112rc4_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
125rc4_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/rc4.h 113rc4_skey.o: ../../include/openssl/rc4.h ../../include/openssl/safestack.h
126rc4_skey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h 114rc4_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
127rc4_skey.o: ../../include/openssl/symhacks.h ../cryptlib.h rc4_locl.h 115rc4_skey.o: ../cryptlib.h rc4_locl.h rc4_skey.c
128rc4_skey.o: rc4_skey.c
diff --git a/src/lib/libcrypto/rc4/asm/rc4-ia64.S b/src/lib/libcrypto/rc4/asm/rc4-ia64.S
index a322d0c718..8210c47d04 100644
--- a/src/lib/libcrypto/rc4/asm/rc4-ia64.S
+++ b/src/lib/libcrypto/rc4/asm/rc4-ia64.S
@@ -75,14 +75,13 @@ yy=r31;
75.skip 16 75.skip 16
76RC4: 76RC4:
77 .prologue 77 .prologue
78 .fframe 0
79 .save ar.pfs,r2 78 .save ar.pfs,r2
80 .save ar.lc,r3
81 .save pr,prsave
82{ .mii; alloc r2=ar.pfs,4,12,0,16 79{ .mii; alloc r2=ar.pfs,4,12,0,16
80 .save pr,prsave
83 mov prsave=pr 81 mov prsave=pr
84 ADDP key=0,in0 };; 82 ADDP key=0,in0 };;
85{ .mib; cmp.eq p6,p0=0,in1 // len==0? 83{ .mib; cmp.eq p6,p0=0,in1 // len==0?
84 .save ar.lc,r3
86 mov r3=ar.lc 85 mov r3=ar.lc
87(p6) br.ret.spnt.many b0 };; // emergency exit 86(p6) br.ret.spnt.many b0 };; // emergency exit
88 87