diff options
| author | djm <> | 2010-10-01 22:54:21 +0000 |
|---|---|---|
| committer | djm <> | 2010-10-01 22:54:21 +0000 |
| commit | 829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2 (patch) | |
| tree | e03b9f1bd051e844b971936729e9df549a209130 /src/lib/libcrypto/rc2 | |
| parent | e6b755d2a53d3cac7a344dfdd6bf7c951cac754c (diff) | |
| download | openbsd-829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2.tar.gz openbsd-829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2.tar.bz2 openbsd-829fd51d4f8dde4a7f3bf54754f3c1d1a502f5e2.zip | |
import OpenSSL-1.0.0a
Diffstat (limited to 'src/lib/libcrypto/rc2')
| -rw-r--r-- | src/lib/libcrypto/rc2/rc2.h | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/rc2/rc2_skey.c | 19 |
2 files changed, 2 insertions, 21 deletions
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; |
