diff options
author | Iaroslav Gridin <voker57@gmail.com> | 2016-10-29 17:47:03 +0300 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2017-01-10 08:21:45 +0100 |
commit | 349b653a99ee37dbcead44a047d6d639c2906ccd (patch) | |
tree | 808c11787c4a7be8cb57a0079bb5b06097714fef /crypto/engine | |
parent | 2c5998dde67f1ed6863e1e31a087e29270712056 (diff) |
fix for BSD cryptodev
by levitte
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1784)
Diffstat (limited to 'crypto/engine')
-rw-r--r-- | crypto/engine/eng_cryptodev.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/crypto/engine/eng_cryptodev.c b/crypto/engine/eng_cryptodev.c index 24692b111f..71a6565cd8 100644 --- a/crypto/engine/eng_cryptodev.c +++ b/crypto/engine/eng_cryptodev.c @@ -81,6 +81,14 @@ void engine_load_cryptodev_int(void) #else +/* Available on cryptodev-linux but not on FreeBSD 8.4 */ +# ifndef CRYPTO_HMAC_MAX_KEY_LEN +# define CRYPTO_HMAC_MAX_KEY_LEN 512 +# endif +# ifndef CRYPTO_CIPHER_MAX_KEY_LEN +# define CRYPTO_CIPHER_MAX_KEY_LEN 64 +# endif + struct dev_crypto_state { struct session_op d_sess; int d_fd; @@ -169,16 +177,22 @@ static struct { {CRYPTO_ARC4, NID_rc4, 0, 16}, {CRYPTO_DES_CBC, NID_des_cbc, 8, 8}, {CRYPTO_3DES_CBC, NID_des_ede3_cbc, 8, 24}, +# if !defined(CRYPTO_ALGORITHM_MIN) || defined(CRYPTO_3DES_ECB) {CRYPTO_3DES_ECB, NID_des_ede3_ecb, 0, 24}, +# endif {CRYPTO_AES_CBC, NID_aes_128_cbc, 16, 16}, {CRYPTO_AES_CBC, NID_aes_192_cbc, 16, 24}, {CRYPTO_AES_CBC, NID_aes_256_cbc, 16, 32}, +# if !defined(CRYPTO_ALGORITHM_MIN) || defined(CRYPTO_AES_CTR) {CRYPTO_AES_CTR, NID_aes_128_ctr, 14, 16}, {CRYPTO_AES_CTR, NID_aes_192_ctr, 14, 24}, {CRYPTO_AES_CTR, NID_aes_256_ctr, 14, 32}, +# endif +# if !defined(CRYPTO_ALGORITHM_MIN) || defined(CRYPTO_AES_ECB) {CRYPTO_AES_ECB, NID_aes_128_ecb, 0, 16}, {CRYPTO_AES_ECB, NID_aes_192_ecb, 0, 24}, {CRYPTO_AES_ECB, NID_aes_256_ecb, 0, 32}, +# endif {CRYPTO_BLF_CBC, NID_bf_cbc, 8, 16}, {CRYPTO_CAST_CBC, NID_cast5_cbc, 8, 16}, {CRYPTO_SKIPJACK_CBC, NID_undef, 0, 0}, |