diff options
author | djm <> | 2012-10-13 21:25:14 +0000 |
---|---|---|
committer | djm <> | 2012-10-13 21:25:14 +0000 |
commit | 93723b50b639d8dc717bc1bf463fd46e1b321239 (patch) | |
tree | 281e0a29ae8f87a8c47fbd4deaa1f3d48b8cc5c1 /src/lib/libcrypto/aes/aes_misc.c | |
parent | 65e72ac55a6405783db7a12d7e35a7561d46005b (diff) | |
download | openbsd-93723b50b639d8dc717bc1bf463fd46e1b321239.tar.gz openbsd-93723b50b639d8dc717bc1bf463fd46e1b321239.tar.bz2 openbsd-93723b50b639d8dc717bc1bf463fd46e1b321239.zip |
resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/aes/aes_misc.c')
-rw-r--r-- | src/lib/libcrypto/aes/aes_misc.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/lib/libcrypto/aes/aes_misc.c b/src/lib/libcrypto/aes/aes_misc.c index 4fead1b4c7..f083488ecb 100644 --- a/src/lib/libcrypto/aes/aes_misc.c +++ b/src/lib/libcrypto/aes/aes_misc.c | |||
@@ -50,6 +50,7 @@ | |||
50 | */ | 50 | */ |
51 | 51 | ||
52 | #include <openssl/opensslv.h> | 52 | #include <openssl/opensslv.h> |
53 | #include <openssl/crypto.h> | ||
53 | #include <openssl/aes.h> | 54 | #include <openssl/aes.h> |
54 | #include "aes_locl.h" | 55 | #include "aes_locl.h" |
55 | 56 | ||
@@ -62,3 +63,23 @@ const char *AES_options(void) { | |||
62 | return "aes(partial)"; | 63 | return "aes(partial)"; |
63 | #endif | 64 | #endif |
64 | } | 65 | } |
66 | |||
67 | /* FIPS wrapper functions to block low level AES calls in FIPS mode */ | ||
68 | |||
69 | int AES_set_encrypt_key(const unsigned char *userKey, const int bits, | ||
70 | AES_KEY *key) | ||
71 | { | ||
72 | #ifdef OPENSSL_FIPS | ||
73 | fips_cipher_abort(AES); | ||
74 | #endif | ||
75 | return private_AES_set_encrypt_key(userKey, bits, key); | ||
76 | } | ||
77 | |||
78 | int AES_set_decrypt_key(const unsigned char *userKey, const int bits, | ||
79 | AES_KEY *key) | ||
80 | { | ||
81 | #ifdef OPENSSL_FIPS | ||
82 | fips_cipher_abort(AES); | ||
83 | #endif | ||
84 | return private_AES_set_decrypt_key(userKey, bits, key); | ||
85 | } | ||