diff options
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 | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/libcrypto/rc2/rc2.h b/src/lib/libcrypto/rc2/rc2.h index 34c8362317..e542ec94ff 100644 --- a/src/lib/libcrypto/rc2/rc2.h +++ b/src/lib/libcrypto/rc2/rc2.h | |||
@@ -79,7 +79,9 @@ typedef struct rc2_key_st | |||
79 | RC2_INT data[64]; | 79 | RC2_INT data[64]; |
80 | } RC2_KEY; | 80 | } RC2_KEY; |
81 | 81 | ||
82 | 82 | #ifdef OPENSSL_FIPS | |
83 | void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); | ||
84 | #endif | ||
83 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); | 85 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data,int bits); |
84 | void RC2_ecb_encrypt(const unsigned char *in,unsigned char *out,RC2_KEY *key, | 86 | void RC2_ecb_encrypt(const unsigned char *in,unsigned char *out,RC2_KEY *key, |
85 | int enc); | 87 | int enc); |
diff --git a/src/lib/libcrypto/rc2/rc2_skey.c b/src/lib/libcrypto/rc2/rc2_skey.c index 0150b0e035..6668ac011f 100644 --- a/src/lib/libcrypto/rc2/rc2_skey.c +++ b/src/lib/libcrypto/rc2/rc2_skey.c | |||
@@ -56,6 +56,7 @@ | |||
56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
57 | */ | 57 | */ |
58 | 58 | ||
59 | #include <openssl/crypto.h> | ||
59 | #include <openssl/rc2.h> | 60 | #include <openssl/rc2.h> |
60 | #include "rc2_locl.h" | 61 | #include "rc2_locl.h" |
61 | 62 | ||
@@ -95,6 +96,13 @@ static const unsigned char key_table[256]={ | |||
95 | * the same as specifying 1024 for the 'bits' parameter. Bsafe uses | 96 | * the same as specifying 1024 for the 'bits' parameter. Bsafe uses |
96 | * a version where the bits parameter is the same as len*8 */ | 97 | * a version where the bits parameter is the same as len*8 */ |
97 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) | 98 | void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) |
99 | #ifdef OPENSSL_FIPS | ||
100 | { | ||
101 | fips_cipher_abort(RC2); | ||
102 | private_RC2_set_key(key, len, data, bits); | ||
103 | } | ||
104 | void private_RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits) | ||
105 | #endif | ||
98 | { | 106 | { |
99 | int i,j; | 107 | int i,j; |
100 | unsigned char *k; | 108 | unsigned char *k; |