From 12f1d003bbaccf2ef229ea6febba70131b9f4343 Mon Sep 17 00:00:00 2001 From: Brad Parker Date: Sun, 26 Aug 2018 16:04:01 -0400 Subject: [PATCH] Qt: openssl 1.1.0 broke their ABI --- ui/drivers/qt/ui_qt_window.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/ui/drivers/qt/ui_qt_window.cpp b/ui/drivers/qt/ui_qt_window.cpp index 22975dd405..bcacb88944 100644 --- a/ui/drivers/qt/ui_qt_window.cpp +++ b/ui/drivers/qt/ui_qt_window.cpp @@ -578,11 +578,17 @@ MainWindow::MainWindow(QWidget *parent) : removeUpdateTempFiles(); #ifdef HAVE_OPENSSL { - const SSL_METHOD* method = TLSv1_method(); +#if OPENSSL_VERSION_AT_LEAST(1,1) + const SSL_METHOD *method = TLS_method(); + SSL_CTX *ctx = SSL_CTX_new(method); + if (ctx) + SSL_CTX_free(ctx); +#else + const SSL_METHOD *method = TLSv1_method(); + RARCH_LOG("[Qt]: TLS supports %d ciphers.\n", method->num_ciphers()); +#endif RARCH_LOG("[Qt]: Using %s\n", OPENSSL_VERSION_TEXT); - - RARCH_LOG("[Qt]: TLSv1 supports %d ciphers.\n", method->num_ciphers()); } #endif }