diff options
author | Hans Nilsson <[email protected]> | 2018-05-08 11:43:35 +0200 |
---|---|---|
committer | Hans Nilsson <[email protected]> | 2018-05-08 11:43:35 +0200 |
commit | 143569f30151422b6a5b0fda662061d41ff82d74 (patch) | |
tree | 25786e520e3c1063946de6c291971dc85da1a00c /lib/crypto/c_src/otp_test_engine.c | |
parent | 26eea10dda1f316045e58e30a126feafe1843d3a (diff) | |
parent | 40ab3958644be3fc14682c54233514fdf880386a (diff) | |
download | otp-143569f30151422b6a5b0fda662061d41ff82d74.tar.gz otp-143569f30151422b6a5b0fda662061d41ff82d74.tar.bz2 otp-143569f30151422b6a5b0fda662061d41ff82d74.zip |
Merge branch 'maint-20' into maint
* maint-20:
Updated OTP version
Prepare release
ssh: Renegotiation -> renegotiate
ssh: Fix DH group exchange server bug for PuTTY and others following draft-draft-00 from 2001 and not the rfc4419
crypto: get_engine_load_cmd_list excluded if no engine support
crypto: Fix compilation for LibreSSL 2.7.x
crypto: Disable test_engine if engine is disabled
crypto: disable engine if OPENSSL_NO_EC* is set If that flag is set, and openssl/engine.h is included, there will be an erro further down in files included by engine.h
Diffstat (limited to 'lib/crypto/c_src/otp_test_engine.c')
-rw-r--r-- | lib/crypto/c_src/otp_test_engine.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lib/crypto/c_src/otp_test_engine.c b/lib/crypto/c_src/otp_test_engine.c index 5c6122c06a..d0e23a2a3e 100644 --- a/lib/crypto/c_src/otp_test_engine.c +++ b/lib/crypto/c_src/otp_test_engine.c @@ -24,10 +24,8 @@ #include <stdio.h> #include <string.h> -#include <openssl/engine.h> #include <openssl/md5.h> #include <openssl/rsa.h> -#include <openssl/pem.h> #define PACKED_OPENSSL_VERSION(MAJ, MIN, FIX, P) \ ((((((((MAJ << 8) | MIN) << 8 ) | FIX) << 8) | (P-'a'+1)) << 4) | 0xf) @@ -40,6 +38,21 @@ #define OLD #endif +#if OPENSSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION(0,9,8,'o') \ + && !defined(OPENSSL_NO_EC) \ + && !defined(OPENSSL_NO_ECDH) \ + && !defined(OPENSSL_NO_ECDSA) +# define HAVE_EC +#endif + +#if defined(HAVE_EC) +/* If OPENSSL_NO_EC is set, there will be an error in ec.h included from engine.h + So if EC is disabled, you can't use Engine either.... +*/ +#include <openssl/engine.h> +#include <openssl/pem.h> + + static const char *test_engine_id = "MD5"; static const char *test_engine_name = "MD5 test engine"; @@ -262,3 +275,5 @@ int pem_passwd_cb_fun(char *buf, int size, int rwflag, void *password) return 0; } } + +#endif |