diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2008-09-21 11:21:43 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2008-09-21 11:21:43 +0000 |
commit | 138f20433e6e9d71140ad7db6813592ebb8f34d5 (patch) | |
tree | 1bc29819056db32f4ae06898c10f799e71a250cd /crypto/camellia | |
parent | 7747c678610ad8c0c8d861c9846d9d0092a440b3 (diff) |
Camellia low level API algorithm blocking.
Diffstat (limited to 'crypto/camellia')
-rw-r--r-- | crypto/camellia/camellia.h | 5 | ||||
-rw-r--r-- | crypto/camellia/cmll_misc.c | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/crypto/camellia/camellia.h b/crypto/camellia/camellia.h index 3c8a359543..b8a8b6e10b 100644 --- a/crypto/camellia/camellia.h +++ b/crypto/camellia/camellia.h @@ -87,6 +87,11 @@ struct camellia_key_st typedef struct camellia_key_st CAMELLIA_KEY; +#ifdef OPENSSL_FIPS +int private_Camellia_set_key(const unsigned char *userKey, const int bits, + CAMELLIA_KEY *key); +#endif + int Camellia_set_key(const unsigned char *userKey, const int bits, CAMELLIA_KEY *key); diff --git a/crypto/camellia/cmll_misc.c b/crypto/camellia/cmll_misc.c index f1047b54e0..c5d698169d 100644 --- a/crypto/camellia/cmll_misc.c +++ b/crypto/camellia/cmll_misc.c @@ -52,11 +52,24 @@ #include <openssl/opensslv.h> #include <openssl/camellia.h> #include "cmll_locl.h" +#include <openssl/crypto.h> +#ifdef OPENSSL_FIPS +#include <openssl/fips.h> +#endif const char CAMELLIA_version[]="CAMELLIA" OPENSSL_VERSION_PTEXT; int Camellia_set_key(const unsigned char *userKey, const int bits, CAMELLIA_KEY *key) +#ifdef OPENSSL_FIPS + { + if (FIPS_mode()) + FIPS_BAD_ABORT(CAMELLIA) + private_Camellia_set_key(userKey, bits, key); + } +int private_Camellia_set_key(const unsigned char *userKey, const int bits, + CAMELLIA_KEY *key) +#endif { if (!userKey || !key) { |