Skip to content

Commit 946b4bd

Browse files
authored
Merge pull request #585 from afrind/openssl-3.5-engine-fix
Fix build with OpenSSL 3.5+ where ENGINE API is removed
2 parents 6ef3a43 + 31d156a commit 946b4bd

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

t/openssl.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@
2929
#include <openssl/opensslv.h>
3030
#include <openssl/bio.h>
3131
#include <openssl/pem.h>
32+
#if !defined(OPENSSL_NO_ENGINE)
3233
#include <openssl/engine.h>
34+
#endif
3335
#if !defined(LIBRESSL_VERSION_NUMBER) && OPENSSL_VERSION_NUMBER >= 0x30000000L
3436
#include <openssl/provider.h>
3537
#endif
@@ -385,6 +387,7 @@ static ptls_aead_context_t *create_ech_opener(ptls_ech_create_opener_t *self, pt
385387

386388
#if ASYNC_TESTS
387389

390+
#if !defined(OPENSSL_NO_ENGINE)
388391
static ENGINE *load_engine(const char *name)
389392
{
390393
ENGINE *e;
@@ -398,6 +401,7 @@ static ENGINE *load_engine(const char *name)
398401

399402
return e;
400403
}
404+
#endif
401405

402406
static struct {
403407
struct {
@@ -639,6 +643,7 @@ int main(int argc, char **argv)
639643
subtest("many-handshakes-non-async", many_handshakes);
640644
openssl_sign_certificate.async = 0;
641645
subtest("many-handshakes-async", many_handshakes);
646+
#if !defined(OPENSSL_NO_ENGINE)
642647
{ /* qatengine should be tested at last, because we do not have the code to unload or un-default it */
643648
const char *engine_name = "qatengine";
644649
ENGINE *qatengine;
@@ -651,6 +656,7 @@ int main(int argc, char **argv)
651656
note("%s not found", engine_name);
652657
}
653658
}
659+
#endif
654660
#endif
655661

656662
int ret = done_testing();

0 commit comments

Comments
 (0)