diff options
Diffstat (limited to 'src/lib/libcrypto/cast')
-rw-r--r-- | src/lib/libcrypto/cast/c_skey.c | 9 | ||||
-rw-r--r-- | src/lib/libcrypto/cast/cast.h | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/lib/libcrypto/cast/c_skey.c b/src/lib/libcrypto/cast/c_skey.c index 76e40005c9..cb6bf9fee3 100644 --- a/src/lib/libcrypto/cast/c_skey.c +++ b/src/lib/libcrypto/cast/c_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/cast.h> | 60 | #include <openssl/cast.h> |
60 | #include "cast_lcl.h" | 61 | #include "cast_lcl.h" |
61 | #include "cast_s.h" | 62 | #include "cast_s.h" |
@@ -71,8 +72,14 @@ | |||
71 | #define S5 CAST_S_table5 | 72 | #define S5 CAST_S_table5 |
72 | #define S6 CAST_S_table6 | 73 | #define S6 CAST_S_table6 |
73 | #define S7 CAST_S_table7 | 74 | #define S7 CAST_S_table7 |
74 | |||
75 | void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data) | 75 | void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data) |
76 | #ifdef OPENSSL_FIPS | ||
77 | { | ||
78 | fips_cipher_abort(CAST); | ||
79 | private_CAST_set_key(key, len, data); | ||
80 | } | ||
81 | void private_CAST_set_key(CAST_KEY *key, int len, const unsigned char *data) | ||
82 | #endif | ||
76 | { | 83 | { |
77 | CAST_LONG x[16]; | 84 | CAST_LONG x[16]; |
78 | CAST_LONG z[16]; | 85 | CAST_LONG z[16]; |
diff --git a/src/lib/libcrypto/cast/cast.h b/src/lib/libcrypto/cast/cast.h index 1a264f8143..203922ea2b 100644 --- a/src/lib/libcrypto/cast/cast.h +++ b/src/lib/libcrypto/cast/cast.h | |||
@@ -83,7 +83,9 @@ typedef struct cast_key_st | |||
83 | int short_key; /* Use reduced rounds for short key */ | 83 | int short_key; /* Use reduced rounds for short key */ |
84 | } CAST_KEY; | 84 | } CAST_KEY; |
85 | 85 | ||
86 | 86 | #ifdef OPENSSL_FIPS | |
87 | void private_CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); | ||
88 | #endif | ||
87 | void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); | 89 | void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); |
88 | void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, const CAST_KEY *key, | 90 | void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, const CAST_KEY *key, |
89 | int enc); | 91 | int enc); |