diff options
author | djm <> | 2008-09-06 12:17:54 +0000 |
---|---|---|
committer | djm <> | 2008-09-06 12:17:54 +0000 |
commit | 38ce604e3cc97706b876b0525ddff0121115456d (patch) | |
tree | 7ccc28afe1789ea3dbedf72365f955d5b8e105b5 /src/lib/libcrypto/rc2/rc2_skey.c | |
parent | 12867252827c8efaa8ddd1fa3b3d6e321e2bcdef (diff) | |
download | openbsd-38ce604e3cc97706b876b0525ddff0121115456d.tar.gz openbsd-38ce604e3cc97706b876b0525ddff0121115456d.tar.bz2 openbsd-38ce604e3cc97706b876b0525ddff0121115456d.zip |
resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/rc2/rc2_skey.c')
-rw-r--r-- | src/lib/libcrypto/rc2/rc2_skey.c | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/src/lib/libcrypto/rc2/rc2_skey.c b/src/lib/libcrypto/rc2/rc2_skey.c index 9652865188..4953642056 100644 --- a/src/lib/libcrypto/rc2/rc2_skey.c +++ b/src/lib/libcrypto/rc2/rc2_skey.c | |||
@@ -57,8 +57,6 @@ | |||
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <openssl/rc2.h> | 59 | #include <openssl/rc2.h> |
60 | #include <openssl/crypto.h> | ||
61 | #include <openssl/fips.h> | ||
62 | #include "rc2_locl.h" | 60 | #include "rc2_locl.h" |
63 | 61 | ||
64 | static unsigned char key_table[256]={ | 62 | static unsigned char key_table[256]={ |
@@ -86,25 +84,17 @@ static unsigned char key_table[256]={ | |||
86 | 0xfe,0x7f,0xc1,0xad, | 84 | 0xfe,0x7f,0xc1,0xad, |
87 | }; | 85 | }; |
88 | 86 | ||
87 | #if defined(_MSC_VER) && defined(_ARM_) | ||
88 | #pragma optimize("g",off) | ||
89 | #endif | ||
90 | |||
89 | /* It has come to my attention that there are 2 versions of the RC2 | 91 | /* It has come to my attention that there are 2 versions of the RC2 |
90 | * key schedule. One which is normal, and anther which has a hook to | 92 | * key schedule. One which is normal, and anther which has a hook to |
91 | * use a reduced key length. | 93 | * use a reduced key length. |
92 | * BSAFE uses the 'retarded' version. What I previously shipped is | 94 | * BSAFE uses the 'retarded' version. What I previously shipped is |
93 | * the same as specifying 1024 for the 'bits' parameter. Bsafe uses | 95 | * the same as specifying 1024 for the 'bits' parameter. Bsafe uses |
94 | * 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 */ |
95 | |||
96 | #ifdef OPENSSL_FIPS | ||
97 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) | ||
98 | { | ||
99 | if (FIPS_mode()) | ||
100 | FIPS_BAD_ABORT(RC2) | ||
101 | private_RC2_set_key(key, len, data, bits); | ||
102 | } | ||
103 | void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, | ||
104 | int bits) | ||
105 | #else | ||
106 | 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) |
107 | #endif | ||
108 | { | 98 | { |
109 | int i,j; | 99 | int i,j; |
110 | unsigned char *k; | 100 | unsigned char *k; |
@@ -150,3 +140,6 @@ void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) | |||
150 | *(ki--)=((k[i]<<8)|k[i-1])&0xffff; | 140 | *(ki--)=((k[i]<<8)|k[i-1])&0xffff; |
151 | } | 141 | } |
152 | 142 | ||
143 | #if defined(_MSC_VER) | ||
144 | #pragma optimize("",on) | ||
145 | #endif | ||