Skip to content

Commit 2f37163

Browse files
committed
test: only include and init openSSL where it's actually used
1 parent fbe4b76 commit 2f37163

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/qt/test/paymentservertests.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include <test/setup_common.h>
1717
#include <util/strencodings.h>
1818

19+
#include <openssl/ssl.h>
1920
#include <openssl/x509.h>
2021
#include <openssl/x509_vfy.h>
2122

@@ -66,6 +67,7 @@ static SendCoinsRecipient handleRequest(PaymentServer* server, std::vector<unsig
6667

6768
void PaymentServerTests::paymentServerTests()
6869
{
70+
SSL_library_init();
6971
BasicTestingSetup testing_setup(CBaseChainParams::MAIN);
7072
auto node = interfaces::MakeNode();
7173
OptionsModel optionsModel(*node);

src/qt/test/test_main.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#include <QObject>
2727
#include <QTest>
2828

29-
#include <openssl/ssl.h>
30-
3129
#if defined(QT_STATICPLUGIN)
3230
#include <QtPlugin>
3331
#if defined(QT_QPA_PLATFORM_MINIMAL)
@@ -73,8 +71,6 @@ int main(int argc, char *argv[])
7371
BitcoinApplication app(*node, argc, argv);
7472
app.setApplicationName("Bitcoin-Qt-test");
7573

76-
SSL_library_init();
77-
7874
AppTests app_tests(app);
7975
if (QTest::qExec(&app_tests) != 0) {
8076
fInvalid = true;

0 commit comments

Comments
 (0)