diff options
author | djm <> | 2010-10-01 22:59:01 +0000 |
---|---|---|
committer | djm <> | 2010-10-01 22:59:01 +0000 |
commit | fe047d8b632246cb2db3234a0a4f32e5c318857b (patch) | |
tree | 939b752540947d33507b3acc48d76a8bfb7c3dc3 /src/lib/libcrypto/rc2 | |
parent | 2ea67f4aa254b09ded62e6e14fc893bbe6381579 (diff) | |
download | openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.tar.gz openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.tar.bz2 openbsd-fe047d8b632246cb2db3234a0a4f32e5c318857b.zip |
resolve conflicts, fix local changes
Diffstat (limited to 'src/lib/libcrypto/rc2')
-rw-r--r-- | src/lib/libcrypto/rc2/Makefile.ssl | 91 | ||||
-rw-r--r-- | src/lib/libcrypto/rc2/rc2.h | 4 | ||||
-rw-r--r-- | src/lib/libcrypto/rc2/rc2_skey.c | 19 |
3 files changed, 2 insertions, 112 deletions
diff --git a/src/lib/libcrypto/rc2/Makefile.ssl b/src/lib/libcrypto/rc2/Makefile.ssl deleted file mode 100644 index 98d5960d5d..0000000000 --- a/src/lib/libcrypto/rc2/Makefile.ssl +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | # | ||
2 | # SSLeay/crypto/rc2/Makefile | ||
3 | # | ||
4 | |||
5 | DIR= rc2 | ||
6 | TOP= ../.. | ||
7 | CC= cc | ||
8 | INCLUDES= | ||
9 | CFLAG=-g | ||
10 | INSTALL_PREFIX= | ||
11 | OPENSSLDIR= /usr/local/ssl | ||
12 | INSTALLTOP=/usr/local/ssl | ||
13 | MAKE= make -f Makefile.ssl | ||
14 | MAKEDEPPROG= makedepend | ||
15 | MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) | ||
16 | MAKEFILE= Makefile.ssl | ||
17 | AR= ar r | ||
18 | |||
19 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
20 | |||
21 | GENERAL=Makefile | ||
22 | TEST=rc2test.c | ||
23 | APPS= | ||
24 | |||
25 | LIB=$(TOP)/libcrypto.a | ||
26 | LIBSRC=rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c rc2ofb64.c | ||
27 | LIBOBJ=rc2_ecb.o rc2_skey.o rc2_cbc.o rc2cfb64.o rc2ofb64.o | ||
28 | |||
29 | SRC= $(LIBSRC) | ||
30 | |||
31 | EXHEADER= rc2.h | ||
32 | HEADER= rc2_locl.h $(EXHEADER) | ||
33 | |||
34 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
35 | |||
36 | top: | ||
37 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
38 | |||
39 | all: lib | ||
40 | |||
41 | lib: $(LIBOBJ) | ||
42 | $(AR) $(LIB) $(LIBOBJ) | ||
43 | $(RANLIB) $(LIB) || echo Never mind. | ||
44 | @touch lib | ||
45 | |||
46 | files: | ||
47 | $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
48 | |||
49 | links: | ||
50 | @sh $(TOP)/util/point.sh Makefile.ssl Makefile | ||
51 | @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) | ||
52 | @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) | ||
53 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) | ||
54 | |||
55 | install: | ||
56 | @for i in $(EXHEADER) ; \ | ||
57 | do \ | ||
58 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | ||
59 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ | ||
60 | done; | ||
61 | |||
62 | tags: | ||
63 | ctags $(SRC) | ||
64 | |||
65 | tests: | ||
66 | |||
67 | lint: | ||
68 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
69 | |||
70 | depend: | ||
71 | $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) | ||
72 | |||
73 | dclean: | ||
74 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
75 | mv -f Makefile.new $(MAKEFILE) | ||
76 | |||
77 | clean: | ||
78 | rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
79 | |||
80 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
81 | |||
82 | rc2_cbc.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h | ||
83 | rc2_cbc.o: rc2_cbc.c rc2_locl.h | ||
84 | rc2_ecb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
85 | rc2_ecb.o: ../../include/openssl/rc2.h rc2_ecb.c rc2_locl.h | ||
86 | rc2_skey.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h | ||
87 | rc2_skey.o: rc2_locl.h rc2_skey.c | ||
88 | rc2cfb64.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h | ||
89 | rc2cfb64.o: rc2_locl.h rc2cfb64.c | ||
90 | rc2ofb64.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc2.h | ||
91 | rc2ofb64.o: rc2_locl.h rc2ofb64.c | ||
diff --git a/src/lib/libcrypto/rc2/rc2.h b/src/lib/libcrypto/rc2/rc2.h index e542ec94ff..34c8362317 100644 --- a/src/lib/libcrypto/rc2/rc2.h +++ b/src/lib/libcrypto/rc2/rc2.h | |||
@@ -79,9 +79,7 @@ typedef struct rc2_key_st | |||
79 | RC2_INT data[64]; | 79 | RC2_INT data[64]; |
80 | } RC2_KEY; | 80 | } RC2_KEY; |
81 | 81 | ||
82 | #ifdef OPENSSL_FIPS | 82 | |
83 | void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); | ||
84 | #endif | ||
85 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); | 83 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); |
86 | void RC2_ecb_encrypt(const unsigned char *in,unsigned char *out,RC2_KEY *key, | 84 | void RC2_ecb_encrypt(const unsigned char *in,unsigned char *out,RC2_KEY *key, |
87 | int enc); | 85 | int enc); |
diff --git a/src/lib/libcrypto/rc2/rc2_skey.c b/src/lib/libcrypto/rc2/rc2_skey.c index 4e000e5b99..0150b0e035 100644 --- a/src/lib/libcrypto/rc2/rc2_skey.c +++ b/src/lib/libcrypto/rc2/rc2_skey.c | |||
@@ -57,14 +57,9 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <openssl/rc2.h> | 59 | #include <openssl/rc2.h> |
60 | #include <openssl/crypto.h> | ||
61 | #ifdef OPENSSL_FIPS | ||
62 | #include <openssl/fips.h> | ||
63 | #endif | ||
64 | |||
65 | #include "rc2_locl.h" | 60 | #include "rc2_locl.h" |
66 | 61 | ||
67 | static unsigned char key_table[256]={ | 62 | static const unsigned char key_table[256]={ |
68 | 0xd9,0x78,0xf9,0xc4,0x19,0xdd,0xb5,0xed,0x28,0xe9,0xfd,0x79, | 63 | 0xd9,0x78,0xf9,0xc4,0x19,0xdd,0xb5,0xed,0x28,0xe9,0xfd,0x79, |
69 | 0x4a,0xa0,0xd8,0x9d,0xc6,0x7e,0x37,0x83,0x2b,0x76,0x53,0x8e, | 64 | 0x4a,0xa0,0xd8,0x9d,0xc6,0x7e,0x37,0x83,0x2b,0x76,0x53,0x8e, |
70 | 0x62,0x4c,0x64,0x88,0x44,0x8b,0xfb,0xa2,0x17,0x9a,0x59,0xf5, | 65 | 0x62,0x4c,0x64,0x88,0x44,0x8b,0xfb,0xa2,0x17,0x9a,0x59,0xf5, |
@@ -99,20 +94,8 @@ static unsigned char key_table[256]={ | |||
99 | * BSAFE uses the 'retarded' version. What I previously shipped is | 94 | * BSAFE uses the 'retarded' version. What I previously shipped is |
100 | * the same as specifying 1024 for the 'bits' parameter. Bsafe uses | 95 | * the same as specifying 1024 for the 'bits' parameter. Bsafe uses |
101 | * a version where the bits parameter is the same as len*8 */ | 96 | * a version where the bits parameter is the same as len*8 */ |
102 | |||
103 | #ifdef OPENSSL_FIPS | ||
104 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) | 97 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) |
105 | { | 98 | { |
106 | if (FIPS_mode()) | ||
107 | FIPS_BAD_ABORT(RC2) | ||
108 | private_RC2_set_key(key, len, data, bits); | ||
109 | } | ||
110 | void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, | ||
111 | int bits) | ||
112 | #else | ||
113 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) | ||
114 | #endif | ||
115 | { | ||
116 | int i,j; | 99 | int i,j; |
117 | unsigned char *k; | 100 | unsigned char *k; |
118 | RC2_INT *ki; | 101 | RC2_INT *ki; |