diff options
author | djm <> | 2008-09-06 12:15:54 +0000 |
---|---|---|
committer | djm <> | 2008-09-06 12:15:54 +0000 |
commit | f519f07de9bfb123f2b32aa3965e6f73c8364b80 (patch) | |
tree | ad353b318ee632f73212a174cffac9bb9e573b7c /src/lib/libcrypto/rc4 | |
parent | 89b182c5db7ea802edfc3ee734b4899b43e13e09 (diff) | |
parent | f1625f274acf5dcd5601f6cb5e29e233b2a441a3 (diff) | |
download | openbsd-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/Makefile | 63 | ||||
-rw-r--r-- | src/lib/libcrypto/rc4/asm/rc4-ia64.S | 5 |
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 | |||
8 | CPP= $(CC) -E | 8 | CPP= $(CC) -E |
9 | INCLUDES= | 9 | INCLUDES= |
10 | CFLAG=-g | 10 | CFLAG=-g |
11 | INSTALL_PREFIX= | ||
12 | OPENSSLDIR= /usr/local/ssl | ||
13 | INSTALLTOP=/usr/local/ssl | ||
14 | MAKEDEPPROG= makedepend | ||
15 | MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) | ||
16 | MAKEFILE= Makefile | ||
17 | AR= ar r | 11 | AR= ar r |
18 | 12 | ||
19 | RC4_ENC=rc4_enc.o | 13 | RC4_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 | ||
26 | CFLAGS= $(INCLUDES) $(CFLAG) | 15 | CFLAGS= $(INCLUDES) $(CFLAG) |
27 | ASFLAGS= $(INCLUDES) $(ASFLAG) | 16 | ASFLAGS= $(INCLUDES) $(ASFLAG) |
17 | AFLAGS= $(ASFLAGS) | ||
28 | 18 | ||
29 | GENERAL=Makefile | 19 | GENERAL=Makefile |
30 | TEST=rc4test.c | 20 | TEST=rc4test.c |
@@ -32,7 +22,7 @@ APPS= | |||
32 | 22 | ||
33 | LIB=$(TOP)/libcrypto.a | 23 | LIB=$(TOP)/libcrypto.a |
34 | LIBSRC=rc4_skey.c rc4_enc.c | 24 | LIBSRC=rc4_skey.c rc4_enc.c |
35 | LIBOBJ=rc4_skey.o $(RC4_ENC) | 25 | LIBOBJ=$(RC4_ENC) |
36 | 26 | ||
37 | SRC= $(LIBSRC) | 27 | SRC= $(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 |
55 | asm/rx86-elf.s: asm/rc4-586.pl ../perlasm/x86asm.pl | 45 | rx86-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 | |
48 | rx86-cof.s: asm/rc4-586.pl ../perlasm/x86asm.pl | ||
49 | (cd asm; $(PERL) rc4-586.pl coff $(CFLAGS) > ../$@) | ||
58 | # a.out | 50 | # a.out |
59 | asm/rx86-out.o: asm/rx86unix.cpp | 51 | rx86-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 | ||
63 | asm/rx86bsdi.o: asm/rx86unix.cpp | ||
64 | $(CPP) -DBSDI asm/rx86unix.cpp | sed 's/ :/:/' | as -o asm/rx86bsdi.o | ||
65 | |||
66 | asm/rx86unix.cpp: asm/rc4-586.pl ../perlasm/x86asm.pl | ||
67 | (cd asm; $(PERL) rc4-586.pl cpp >rx86unix.cpp) | ||
68 | 53 | ||
69 | asm/rc4-x86_64.s: asm/rc4-x86_64.pl; $(PERL) asm/rc4-x86_64.pl $@ | 54 | rc4-x86_64.s: asm/rc4-x86_64.pl; $(PERL) asm/rc4-x86_64.pl $@ |
70 | 55 | ||
71 | asm/rc4-ia64.s: asm/rc4-ia64.S | 56 | rc4-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 | ||
86 | install: | 71 | install: |
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 | ||
101 | depend: | 87 | depend: |
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 | ||
104 | dclean: | 91 | dclean: |
@@ -106,7 +93,7 @@ dclean: | |||
106 | mv -f Makefile.new $(MAKEFILE) | 93 | mv -f Makefile.new $(MAKEFILE) |
107 | 94 | ||
108 | clean: | 95 | clean: |
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 | |||
114 | rc4_enc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 101 | rc4_enc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
115 | rc4_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 102 | rc4_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
116 | rc4_enc.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | 103 | rc4_enc.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
117 | rc4_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/rc4.h | 104 | rc4_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
118 | rc4_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 105 | rc4_enc.o: ../../include/openssl/rc4.h ../../include/openssl/safestack.h |
119 | rc4_enc.o: ../../include/openssl/symhacks.h ../cryptlib.h rc4_enc.c rc4_locl.h | 106 | rc4_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
107 | rc4_enc.o: ../cryptlib.h rc4_enc.c rc4_locl.h | ||
120 | rc4_skey.o: ../../e_os.h ../../include/openssl/bio.h | 108 | rc4_skey.o: ../../e_os.h ../../include/openssl/bio.h |
121 | rc4_skey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | 109 | rc4_skey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h |
122 | rc4_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | 110 | rc4_skey.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h |
123 | rc4_skey.o: ../../include/openssl/fips.h ../../include/openssl/lhash.h | 111 | rc4_skey.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h |
124 | rc4_skey.o: ../../include/openssl/opensslconf.h | 112 | rc4_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h |
125 | rc4_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/rc4.h | 113 | rc4_skey.o: ../../include/openssl/rc4.h ../../include/openssl/safestack.h |
126 | rc4_skey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 114 | rc4_skey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h |
127 | rc4_skey.o: ../../include/openssl/symhacks.h ../cryptlib.h rc4_locl.h | 115 | rc4_skey.o: ../cryptlib.h rc4_locl.h rc4_skey.c |
128 | rc4_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 |
76 | RC4: | 76 | RC4: |
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 | ||