Skip to content

Commit 31d156a

Browse files
kazuhoOpenCode with Qwen3.5-27B
andcommitted
Using just OPENSSL_NO_ENGINE is fine.
Co-Authored-By: OpenCode with Qwen3.5-27B <kazuhooku+opencode@gmail.com>
1 parent 314a139 commit 31d156a

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

t/openssl.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,8 @@
2929
#include <openssl/opensslv.h>
3030
#include <openssl/bio.h>
3131
#include <openssl/pem.h>
32-
#if !defined(OPENSSL_NO_ENGINE) && (!defined(OPENSSL_VERSION_MAJOR) || OPENSSL_VERSION_MAJOR < 4)
32+
#if !defined(OPENSSL_NO_ENGINE)
3333
#include <openssl/engine.h>
34-
#define PICOTLS_HAVE_ENGINE 1
3534
#endif
3635
#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x30000000L
3736
#include <openssl/provider.h>
@@ -388,7 +387,7 @@ static ptls_aead_context_t *create_ech_opener(ptls_ech_create_opener_t *self, pt
388387

389388
#if ASYNC_TESTS
390389

391-
#if defined(PICOTLS_HAVE_ENGINE)
390+
#if !defined(OPENSSL_NO_ENGINE)
392391
static ENGINE *load_engine(const char *name)
393392
{
394393
ENGINE *e;
@@ -550,7 +549,7 @@ int main(int argc, char **argv)
550549
/* Explicitly load the legacy provider in addition to default, as we test Blowfish in one of the tests. */
551550
OSSL_PROVIDER *legacy = OSSL_PROVIDER_load(NULL, "legacy");
552551
OSSL_PROVIDER *dflt = OSSL_PROVIDER_load(NULL, "default");
553-
#elif defined(PICOTLS_HAVE_ENGINE)
552+
#elif !defined(OPENSSL_NO_ENGINE)
554553
/* Load all compiled-in ENGINEs */
555554
ENGINE_load_builtin_engines();
556555
ENGINE_register_all_ciphers();
@@ -644,7 +643,7 @@ int main(int argc, char **argv)
644643
subtest("many-handshakes-non-async", many_handshakes);
645644
openssl_sign_certificate.async = 0;
646645
subtest("many-handshakes-async", many_handshakes);
647-
#if defined(PICOTLS_HAVE_ENGINE)
646+
#if !defined(OPENSSL_NO_ENGINE)
648647
{ /* qatengine should be tested at last, because we do not have the code to unload or un-default it */
649648
const char *engine_name = "qatengine";
650649
ENGINE *qatengine;

0 commit comments

Comments
 (0)