|
29 | 29 | #include <openssl/opensslv.h> |
30 | 30 | #include <openssl/bio.h> |
31 | 31 | #include <openssl/pem.h> |
32 | | -#if !defined(OPENSSL_NO_ENGINE) && (!defined(OPENSSL_VERSION_MAJOR) || OPENSSL_VERSION_MAJOR < 4) |
| 32 | +#if !defined(OPENSSL_NO_ENGINE) |
33 | 33 | #include <openssl/engine.h> |
34 | | -#define PICOTLS_HAVE_ENGINE 1 |
35 | 34 | #endif |
36 | 35 | #if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x30000000L |
37 | 36 | #include <openssl/provider.h> |
@@ -388,7 +387,7 @@ static ptls_aead_context_t *create_ech_opener(ptls_ech_create_opener_t *self, pt |
388 | 387 |
|
389 | 388 | #if ASYNC_TESTS |
390 | 389 |
|
391 | | -#if defined(PICOTLS_HAVE_ENGINE) |
| 390 | +#if !defined(OPENSSL_NO_ENGINE) |
392 | 391 | static ENGINE *load_engine(const char *name) |
393 | 392 | { |
394 | 393 | ENGINE *e; |
@@ -550,7 +549,7 @@ int main(int argc, char **argv) |
550 | 549 | /* Explicitly load the legacy provider in addition to default, as we test Blowfish in one of the tests. */ |
551 | 550 | OSSL_PROVIDER *legacy = OSSL_PROVIDER_load(NULL, "legacy"); |
552 | 551 | OSSL_PROVIDER *dflt = OSSL_PROVIDER_load(NULL, "default"); |
553 | | -#elif defined(PICOTLS_HAVE_ENGINE) |
| 552 | +#elif !defined(OPENSSL_NO_ENGINE) |
554 | 553 | /* Load all compiled-in ENGINEs */ |
555 | 554 | ENGINE_load_builtin_engines(); |
556 | 555 | ENGINE_register_all_ciphers(); |
@@ -644,7 +643,7 @@ int main(int argc, char **argv) |
644 | 643 | subtest("many-handshakes-non-async", many_handshakes); |
645 | 644 | openssl_sign_certificate.async = 0; |
646 | 645 | subtest("many-handshakes-async", many_handshakes); |
647 | | -#if defined(PICOTLS_HAVE_ENGINE) |
| 646 | +#if !defined(OPENSSL_NO_ENGINE) |
648 | 647 | { /* qatengine should be tested at last, because we do not have the code to unload or un-default it */ |
649 | 648 | const char *engine_name = "qatengine"; |
650 | 649 | ENGINE *qatengine; |
|
0 commit comments