From f4f7ae013da9bb253e367c879e23abcd55515f82 Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Wed, 22 Jun 2016 22:28:12 +0200 Subject: [PATCH] Fix inconsistency between the #if guards in SSL PSK code - Part 2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The declaration and definition of the forwarding functions for PSK differed which leads to link errors with some versions of openssl. Change-Id: Ic62d87dbd33a77f3c114f0a597a6c0858b22174a Reviewed-by: Richard J. Moore Reviewed-by: André Klitzing --- src/network/ssl/qsslcontext_openssl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/network/ssl/qsslcontext_openssl.cpp b/src/network/ssl/qsslcontext_openssl.cpp index 5a80d08e24..dec8e12abb 100644 --- a/src/network/ssl/qsslcontext_openssl.cpp +++ b/src/network/ssl/qsslcontext_openssl.cpp @@ -344,10 +344,10 @@ init_context: } #endif // OPENSSL_NO_EC -#ifndef OPENSSL_NO_PSK +#if OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_PSK) if (!client) q_SSL_CTX_use_psk_identity_hint(sslContext->ctx, sslContext->sslConfiguration.preSharedKeyIdentityHint().constData()); -#endif // OPENSSL_NO_PSK +#endif // OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_PSK) const QVector qcurves = sslContext->sslConfiguration.ellipticCurves(); if (!qcurves.isEmpty()) {