diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/rc5/Makefile | 51 | ||||
| -rw-r--r-- | src/lib/libcrypto/rc5/rc5.h | 7 | ||||
| -rw-r--r-- | src/lib/libcrypto/rc5/rc5_locl.h | 2 |
3 files changed, 26 insertions, 34 deletions
diff --git a/src/lib/libcrypto/rc5/Makefile b/src/lib/libcrypto/rc5/Makefile index 16e6a60017..efb0f36b59 100644 --- a/src/lib/libcrypto/rc5/Makefile +++ b/src/lib/libcrypto/rc5/Makefile | |||
| @@ -8,11 +8,6 @@ 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 | 11 | MAKEFILE= Makefile |
| 17 | AR= ar r | 12 | AR= ar r |
| 18 | 13 | ||
| @@ -22,6 +17,7 @@ RC5_ENC= rc5_enc.o | |||
| 22 | 17 | ||
| 23 | CFLAGS= $(INCLUDES) $(CFLAG) | 18 | CFLAGS= $(INCLUDES) $(CFLAG) |
| 24 | ASFLAGS= $(INCLUDES) $(ASFLAG) | 19 | ASFLAGS= $(INCLUDES) $(ASFLAG) |
| 20 | AFLAGS= $(ASFLAGS) | ||
| 25 | 21 | ||
| 26 | GENERAL=Makefile | 22 | GENERAL=Makefile |
| 27 | TEST=rc5test.c | 23 | TEST=rc5test.c |
| @@ -48,20 +44,15 @@ lib: $(LIBOBJ) | |||
| 48 | $(RANLIB) $(LIB) || echo Never mind. | 44 | $(RANLIB) $(LIB) || echo Never mind. |
| 49 | @touch lib | 45 | @touch lib |
| 50 | 46 | ||
| 51 | # elf | 47 | # ELF |
| 52 | asm/r586-elf.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl | 48 | r586-elf.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl |
| 53 | (cd asm; $(PERL) rc5-586.pl elf $(CFLAGS) > r586-elf.s) | 49 | (cd asm; $(PERL) rc5-586.pl elf $(CFLAGS) > ../$@) |
| 54 | 50 | # COFF | |
| 51 | r586-cof.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl | ||
| 52 | (cd asm; $(PERL) rc5-586.pl coff $(CFLAGS) > ../$@) | ||
| 55 | # a.out | 53 | # a.out |
| 56 | asm/r586-out.o: asm/r586unix.cpp | 54 | r586-out.s: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl |
| 57 | $(CPP) -DOUT asm/r586unix.cpp | as -o asm/r586-out.o | 55 | (cd asm; $(PERL) rc5-586.pl a.out $(CFLAGS) > ../$@) |
| 58 | |||
| 59 | # bsdi | ||
| 60 | asm/r586bsdi.o: asm/r586unix.cpp | ||
| 61 | $(CPP) -DBSDI asm/r586unix.cpp | sed 's/ :/:/' | as -o asm/r586bsdi.o | ||
| 62 | |||
| 63 | asm/r586unix.cpp: asm/rc5-586.pl ../perlasm/x86asm.pl ../perlasm/cbc.pl | ||
| 64 | (cd asm; $(PERL) rc5-586.pl cpp >r586unix.cpp) | ||
| 65 | 56 | ||
| 66 | files: | 57 | files: |
| 67 | $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO | 58 | $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO |
| @@ -72,6 +63,7 @@ links: | |||
| 72 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) | 63 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) |
| 73 | 64 | ||
| 74 | install: | 65 | install: |
| 66 | @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... | ||
| 75 | @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ | 67 | @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ |
| 76 | do \ | 68 | do \ |
| 77 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | 69 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ |
| @@ -87,6 +79,7 @@ lint: | |||
| 87 | lint -DLINT $(INCLUDES) $(SRC)>fluff | 79 | lint -DLINT $(INCLUDES) $(SRC)>fluff |
| 88 | 80 | ||
| 89 | depend: | 81 | depend: |
| 82 | @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile... | ||
| 90 | $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) | 83 | $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(PROGS) $(LIBSRC) |
| 91 | 84 | ||
| 92 | dclean: | 85 | dclean: |
| @@ -94,17 +87,17 @@ dclean: | |||
| 94 | mv -f Makefile.new $(MAKEFILE) | 87 | mv -f Makefile.new $(MAKEFILE) |
| 95 | 88 | ||
| 96 | clean: | 89 | clean: |
| 97 | rm -f asm/r586unix.cpp asm/*-elf.* *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | 90 | rm -f *.s *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff |
| 98 | 91 | ||
| 99 | # DO NOT DELETE THIS LINE -- make depend depends on it. | 92 | # DO NOT DELETE THIS LINE -- make depend depends on it. |
| 100 | 93 | ||
| 101 | rc5_ecb.o: ../../include/openssl/opensslv.h ../../include/openssl/rc5.h | 94 | rc5_ecb.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h |
| 102 | rc5_ecb.o: rc5_ecb.c rc5_locl.h | 95 | rc5_ecb.o: ../../include/openssl/rc5.h rc5_ecb.c rc5_locl.h |
| 103 | rc5_enc.o: ../../include/openssl/rc5.h rc5_enc.c rc5_locl.h | 96 | rc5_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc5.h |
| 104 | rc5_skey.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | 97 | rc5_enc.o: rc5_enc.c rc5_locl.h |
| 105 | rc5_skey.o: ../../include/openssl/fips.h ../../include/openssl/opensslconf.h | 98 | rc5_skey.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc5.h |
| 106 | rc5_skey.o: ../../include/openssl/opensslv.h ../../include/openssl/rc5.h | 99 | rc5_skey.o: rc5_locl.h rc5_skey.c |
| 107 | rc5_skey.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | 100 | rc5cfb64.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc5.h |
| 108 | rc5_skey.o: ../../include/openssl/symhacks.h rc5_locl.h rc5_skey.c | 101 | rc5cfb64.o: rc5_locl.h rc5cfb64.c |
| 109 | rc5cfb64.o: ../../include/openssl/rc5.h rc5_locl.h rc5cfb64.c | 102 | rc5ofb64.o: ../../include/openssl/opensslconf.h ../../include/openssl/rc5.h |
| 110 | rc5ofb64.o: ../../include/openssl/rc5.h rc5_locl.h rc5ofb64.c | 103 | rc5ofb64.o: rc5_locl.h rc5ofb64.c |
diff --git a/src/lib/libcrypto/rc5/rc5.h b/src/lib/libcrypto/rc5/rc5.h index aa3f26920b..4b3c153b50 100644 --- a/src/lib/libcrypto/rc5/rc5.h +++ b/src/lib/libcrypto/rc5/rc5.h | |||
| @@ -59,6 +59,8 @@ | |||
| 59 | #ifndef HEADER_RC5_H | 59 | #ifndef HEADER_RC5_H |
| 60 | #define HEADER_RC5_H | 60 | #define HEADER_RC5_H |
| 61 | 61 | ||
| 62 | #include <openssl/opensslconf.h> /* OPENSSL_NO_RC5 */ | ||
| 63 | |||
| 62 | #ifdef __cplusplus | 64 | #ifdef __cplusplus |
| 63 | extern "C" { | 65 | extern "C" { |
| 64 | #endif | 66 | #endif |
| @@ -92,10 +94,7 @@ typedef struct rc5_key_st | |||
| 92 | RC5_32_INT data[2*(RC5_16_ROUNDS+1)]; | 94 | RC5_32_INT data[2*(RC5_16_ROUNDS+1)]; |
| 93 | } RC5_32_KEY; | 95 | } RC5_32_KEY; |
| 94 | 96 | ||
| 95 | #ifdef OPENSSL_FIPS | 97 | |
| 96 | void private_RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, | ||
| 97 | int rounds); | ||
| 98 | #endif | ||
| 99 | void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, | 98 | void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, |
| 100 | int rounds); | 99 | int rounds); |
| 101 | void RC5_32_ecb_encrypt(const unsigned char *in,unsigned char *out,RC5_32_KEY *key, | 100 | void RC5_32_ecb_encrypt(const unsigned char *in,unsigned char *out,RC5_32_KEY *key, |
diff --git a/src/lib/libcrypto/rc5/rc5_locl.h b/src/lib/libcrypto/rc5/rc5_locl.h index f4ebc23004..282dd38822 100644 --- a/src/lib/libcrypto/rc5/rc5_locl.h +++ b/src/lib/libcrypto/rc5/rc5_locl.h | |||
| @@ -146,7 +146,7 @@ | |||
| 146 | *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ | 146 | *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ |
| 147 | *((c)++)=(unsigned char)(((l) )&0xff)) | 147 | *((c)++)=(unsigned char)(((l) )&0xff)) |
| 148 | 148 | ||
| 149 | #if defined(OPENSSL_SYS_WIN32) && defined(_MSC_VER) | 149 | #if (defined(OPENSSL_SYS_WIN32) && defined(_MSC_VER)) || defined(__ICC) |
| 150 | #define ROTATE_l32(a,n) _lrotl(a,n) | 150 | #define ROTATE_l32(a,n) _lrotl(a,n) |
| 151 | #define ROTATE_r32(a,n) _lrotr(a,n) | 151 | #define ROTATE_r32(a,n) _lrotr(a,n) |
| 152 | #elif defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) && !defined(PEDANTIC) | 152 | #elif defined(__GNUC__) && __GNUC__>=2 && !defined(__STRICT_ANSI__) && !defined(OPENSSL_NO_ASM) && !defined(OPENSSL_NO_INLINE_ASM) && !defined(PEDANTIC) |
