diff options
| author | djm <> | 2009-01-09 12:14:11 +0000 |
|---|---|---|
| committer | djm <> | 2009-01-09 12:14:11 +0000 |
| commit | ed26972d251de1f03147983371ecfba887241c5e (patch) | |
| tree | a92ed8bb9450f2391bf3955cbfb87d5f3cf9e051 /src/lib/libcrypto/camellia | |
| parent | d19d62684064bd8fbc9643cd864f3a0299102c8d (diff) | |
| parent | a0fdc9ec41594852f67ec77dfad9cb06bacc4186 (diff) | |
| download | openbsd-ed26972d251de1f03147983371ecfba887241c5e.tar.gz openbsd-ed26972d251de1f03147983371ecfba887241c5e.tar.bz2 openbsd-ed26972d251de1f03147983371ecfba887241c5e.zip | |
This commit was generated by cvs2git to track changes on a CVS vendor
branch.
Diffstat (limited to 'src/lib/libcrypto/camellia')
| -rw-r--r-- | src/lib/libcrypto/camellia/camellia.h | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/camellia/cmll_misc.c | 13 |
2 files changed, 18 insertions, 0 deletions
diff --git a/src/lib/libcrypto/camellia/camellia.h b/src/lib/libcrypto/camellia/camellia.h index 3c8a359543..b8a8b6e10b 100644 --- a/src/lib/libcrypto/camellia/camellia.h +++ b/src/lib/libcrypto/camellia/camellia.h | |||
| @@ -87,6 +87,11 @@ struct camellia_key_st | |||
| 87 | 87 | ||
| 88 | typedef struct camellia_key_st CAMELLIA_KEY; | 88 | typedef struct camellia_key_st CAMELLIA_KEY; |
| 89 | 89 | ||
| 90 | #ifdef OPENSSL_FIPS | ||
| 91 | int private_Camellia_set_key(const unsigned char *userKey, const int bits, | ||
| 92 | CAMELLIA_KEY *key); | ||
| 93 | #endif | ||
| 94 | |||
| 90 | int Camellia_set_key(const unsigned char *userKey, const int bits, | 95 | int Camellia_set_key(const unsigned char *userKey, const int bits, |
| 91 | CAMELLIA_KEY *key); | 96 | CAMELLIA_KEY *key); |
| 92 | 97 | ||
diff --git a/src/lib/libcrypto/camellia/cmll_misc.c b/src/lib/libcrypto/camellia/cmll_misc.c index f1047b54e0..2cd7aba9bb 100644 --- a/src/lib/libcrypto/camellia/cmll_misc.c +++ b/src/lib/libcrypto/camellia/cmll_misc.c | |||
| @@ -52,11 +52,24 @@ | |||
| 52 | #include <openssl/opensslv.h> | 52 | #include <openssl/opensslv.h> |
| 53 | #include <openssl/camellia.h> | 53 | #include <openssl/camellia.h> |
| 54 | #include "cmll_locl.h" | 54 | #include "cmll_locl.h" |
| 55 | #include <openssl/crypto.h> | ||
| 56 | #ifdef OPENSSL_FIPS | ||
| 57 | #include <openssl/fips.h> | ||
| 58 | #endif | ||
| 55 | 59 | ||
| 56 | const char CAMELLIA_version[]="CAMELLIA" OPENSSL_VERSION_PTEXT; | 60 | const char CAMELLIA_version[]="CAMELLIA" OPENSSL_VERSION_PTEXT; |
| 57 | 61 | ||
| 58 | int Camellia_set_key(const unsigned char *userKey, const int bits, | 62 | int Camellia_set_key(const unsigned char *userKey, const int bits, |
| 59 | CAMELLIA_KEY *key) | 63 | CAMELLIA_KEY *key) |
| 64 | #ifdef OPENSSL_FIPS | ||
| 65 | { | ||
| 66 | if (FIPS_mode()) | ||
| 67 | FIPS_BAD_ABORT(CAMELLIA) | ||
| 68 | return private_Camellia_set_key(userKey, bits, key); | ||
| 69 | } | ||
| 70 | int private_Camellia_set_key(const unsigned char *userKey, const int bits, | ||
| 71 | CAMELLIA_KEY *key) | ||
| 72 | #endif | ||
| 60 | { | 73 | { |
| 61 | if (!userKey || !key) | 74 | if (!userKey || !key) |
| 62 | { | 75 | { |
