test: fix addon tests compilation with OpenSSL 1.1.1

openssl/provider.h header is not part of OpenSSL 1.1.1 so do not
include it when building with an older instance.

Fixes: https://github.com/nodejs/node/issues/44722
PR-URL: https://github.com/nodejs/node/pull/44725
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
This commit is contained in:
Adam Majer 2022-09-23 01:19:44 +02:00 committed by GitHub
parent 098eac7f27
commit 456591829b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,10 @@
#include <assert.h>
#include <node.h>
#include <openssl/opensslv.h>
#if OPENSSL_VERSION_MAJOR >= 3
#include <openssl/provider.h>
#endif
namespace {