diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2008-09-06 12:17:55 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2008-09-06 12:17:55 +0000 |
commit | 96de7a4399a8c71cbb70d6252fa77acfd76b3f09 (patch) | |
tree | e6f6e4aad1952944ccd27e9eb47ea48b9a78dde7 /lib/libcrypto/rc2 | |
parent | ec7710fe8f10fb624fbc33c0bbad2474e0c26979 (diff) |
resolve conflicts
Diffstat (limited to 'lib/libcrypto/rc2')
-rw-r--r-- | lib/libcrypto/rc2/rc2.h | 7 | ||||
-rw-r--r-- | lib/libcrypto/rc2/rc2_ecb.c | 2 | ||||
-rw-r--r-- | lib/libcrypto/rc2/rc2_skey.c | 21 | ||||
-rw-r--r-- | lib/libcrypto/rc2/rc2speed.c | 3 | ||||
-rw-r--r-- | lib/libcrypto/rc2/rc2test.c | 3 |
5 files changed, 16 insertions, 20 deletions
diff --git a/lib/libcrypto/rc2/rc2.h b/lib/libcrypto/rc2/rc2.h index 71788158d84..34c83623172 100644 --- a/lib/libcrypto/rc2/rc2.h +++ b/lib/libcrypto/rc2/rc2.h @@ -59,6 +59,7 @@ #ifndef HEADER_RC2_H #define HEADER_RC2_H +#include <openssl/opensslconf.h> /* OPENSSL_NO_RC2, RC2_INT */ #ifdef OPENSSL_NO_RC2 #error RC2 is disabled. #endif @@ -66,7 +67,6 @@ #define RC2_ENCRYPT 1 #define RC2_DECRYPT 0 -#include <openssl/opensslconf.h> /* RC2_INT */ #define RC2_BLOCK 8 #define RC2_KEY_LENGTH 16 @@ -79,10 +79,7 @@ typedef struct rc2_key_st RC2_INT data[64]; } RC2_KEY; -#ifdef OPENSSL_FIPS -void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, - int bits); -#endif + void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); void RC2_ecb_encrypt(const unsigned char *in,unsigned char *out,RC2_KEY *key, int enc); diff --git a/lib/libcrypto/rc2/rc2_ecb.c b/lib/libcrypto/rc2/rc2_ecb.c index d3e8c2718a3..fff86c7af89 100644 --- a/lib/libcrypto/rc2/rc2_ecb.c +++ b/lib/libcrypto/rc2/rc2_ecb.c @@ -60,7 +60,7 @@ #include "rc2_locl.h" #include <openssl/opensslv.h> -const char *RC2_version="RC2" OPENSSL_VERSION_PTEXT; +const char RC2_version[]="RC2" OPENSSL_VERSION_PTEXT; /* RC2 as implemented frm a posting from * Newsgroups: sci.crypt diff --git a/lib/libcrypto/rc2/rc2_skey.c b/lib/libcrypto/rc2/rc2_skey.c index 96528651887..49536420566 100644 --- a/lib/libcrypto/rc2/rc2_skey.c +++ b/lib/libcrypto/rc2/rc2_skey.c @@ -57,8 +57,6 @@ */ #include <openssl/rc2.h> -#include <openssl/crypto.h> -#include <openssl/fips.h> #include "rc2_locl.h" static unsigned char key_table[256]={ @@ -86,25 +84,17 @@ static unsigned char key_table[256]={ 0xfe,0x7f,0xc1,0xad, }; +#if defined(_MSC_VER) && defined(_ARM_) +#pragma optimize("g",off) +#endif + /* It has come to my attention that there are 2 versions of the RC2 * key schedule. One which is normal, and anther which has a hook to * use a reduced key length. * BSAFE uses the 'retarded' version. What I previously shipped is * the same as specifying 1024 for the 'bits' parameter. Bsafe uses * a version where the bits parameter is the same as len*8 */ - -#ifdef OPENSSL_FIPS -void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) - { - if (FIPS_mode()) - FIPS_BAD_ABORT(RC2) - private_RC2_set_key(key, len, data, bits); - } -void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, - int bits) -#else void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) -#endif { int i,j; unsigned char *k; @@ -150,3 +140,6 @@ void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) *(ki--)=((k[i]<<8)|k[i-1])&0xffff; } +#if defined(_MSC_VER) +#pragma optimize("",on) +#endif diff --git a/lib/libcrypto/rc2/rc2speed.c b/lib/libcrypto/rc2/rc2speed.c index 4d0e1242eaf..85cf6f65bf1 100644 --- a/lib/libcrypto/rc2/rc2speed.c +++ b/lib/libcrypto/rc2/rc2speed.c @@ -69,7 +69,10 @@ #include OPENSSL_UNISTD_IO OPENSSL_DECLARE_EXIT +#ifndef OPENSSL_SYS_NETWARE #include <signal.h> +#endif + #ifndef _IRIX #include <time.h> #endif diff --git a/lib/libcrypto/rc2/rc2test.c b/lib/libcrypto/rc2/rc2test.c index b67bafb49f4..0e117436bb3 100644 --- a/lib/libcrypto/rc2/rc2test.c +++ b/lib/libcrypto/rc2/rc2test.c @@ -205,6 +205,9 @@ int main(int argc, char *argv[]) printf("ok\n"); #endif +#ifdef OPENSSL_SYS_NETWARE + if (err) printf("ERROR: %d\n", err); +#endif EXIT(err); return(err); } |