a0fe3d1
diff -up qtbase-opensource-src-5.7.1/src/network/ssl/qsslcertificate_openssl.cpp.openssl11 qtbase-opensource-src-5.7.1/src/network/ssl/qsslcertificate_openssl.cpp
a0fe3d1
--- qtbase-opensource-src-5.7.1/src/network/ssl/qsslcertificate_openssl.cpp.openssl11	2016-11-17 14:34:21.000000000 -0500
0434621
+++ qtbase-opensource-src-5.7.1/src/network/ssl/qsslcertificate_openssl.cpp	2016-11-24 07:51:02.131933265 -0500
a0fe3d1
@@ -66,7 +66,7 @@ uint qHash(const QSslCertificate &key, u
a0fe3d1
     if (X509 * const x509 = key.d->x509) {
a0fe3d1
         (void)q_X509_cmp(x509, x509); // populate x509->sha1_hash
a0fe3d1
                                       // (if someone knows a better way...)
a0fe3d1
-        return qHashBits(x509->sha1_hash, SHA_DIGEST_LENGTH, seed);
a0fe3d1
+        return X509_issuer_and_serial_hash(x509); // FIXME was qHashBits(x509->sha1_hash, SHA_DIGEST_LENGTH, seed)
a0fe3d1
     } else {
a0fe3d1
         return seed;
a0fe3d1
     }
a0fe3d1
@@ -90,7 +90,7 @@ QByteArray QSslCertificate::version() co
a0fe3d1
     QMutexLocker lock(QMutexPool::globalInstanceGet(d.data()));
a0fe3d1
     if (d->versionString.isEmpty() && d->x509)
a0fe3d1
         d->versionString =
a0fe3d1
-            QByteArray::number(qlonglong(q_ASN1_INTEGER_get(d->x509->cert_info->version)) + 1);
a0fe3d1
+            QByteArray::number(qlonglong(X509_get_version(d->x509)) + 1);
a0fe3d1
 
a0fe3d1
     return d->versionString;
a0fe3d1
 }
a0fe3d1
@@ -99,7 +99,7 @@ QByteArray QSslCertificate::serialNumber
a0fe3d1
 {
a0fe3d1
     QMutexLocker lock(QMutexPool::globalInstanceGet(d.data()));
a0fe3d1
     if (d->serialNumberString.isEmpty() && d->x509) {
a0fe3d1
-        ASN1_INTEGER *serialNumber = d->x509->cert_info->serialNumber;
a0fe3d1
+        ASN1_INTEGER *serialNumber = X509_get_serialNumber(d->x509);
a0fe3d1
         QByteArray hexString;
a0fe3d1
         hexString.reserve(serialNumber->length * 3);
a0fe3d1
         for (int a = 0; a < serialNumber->length; ++a) {
a0fe3d1
@@ -235,25 +235,22 @@ QSslKey QSslCertificate::publicKey() con
a0fe3d1
     QSslKey key;
a0fe3d1
 
a0fe3d1
     key.d->type = QSsl::PublicKey;
a0fe3d1
-    X509_PUBKEY *xkey = d->x509->cert_info->key;
a0fe3d1
+    X509_PUBKEY *xkey = X509_get_X509_PUBKEY(d->x509);
a0fe3d1
     EVP_PKEY *pkey = q_X509_PUBKEY_get(xkey);
a0fe3d1
     Q_ASSERT(pkey);
a0fe3d1
 
a0fe3d1
-    if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_RSA) {
a0fe3d1
-        key.d->rsa = q_EVP_PKEY_get1_RSA(pkey);
a0fe3d1
+    if ((key.d->rsa = q_EVP_PKEY_get1_RSA(pkey))) {
a0fe3d1
         key.d->algorithm = QSsl::Rsa;
a0fe3d1
         key.d->isNull = false;
a0fe3d1
-    } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DSA) {
a0fe3d1
-        key.d->dsa = q_EVP_PKEY_get1_DSA(pkey);
a0fe3d1
+    } else if ((key.d->dsa = q_EVP_PKEY_get1_DSA(pkey))) {
a0fe3d1
         key.d->algorithm = QSsl::Dsa;
a0fe3d1
         key.d->isNull = false;
a0fe3d1
 #ifndef OPENSSL_NO_EC
a0fe3d1
-    } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_EC) {
a0fe3d1
-        key.d->ec = q_EVP_PKEY_get1_EC_KEY(pkey);
a0fe3d1
+    } else if ((key.d->ec = q_EVP_PKEY_get1_EC_KEY(pkey))) {
a0fe3d1
         key.d->algorithm = QSsl::Ec;
a0fe3d1
         key.d->isNull = false;
a0fe3d1
 #endif
a0fe3d1
-    } else if (q_EVP_PKEY_type(pkey->type) == EVP_PKEY_DH) {
a0fe3d1
+    } else if (EVP_PKEY_get1_DH(pkey)) {
a0fe3d1
         // DH unsupported
a0fe3d1
     } else {
a0fe3d1
         // error?
a0fe3d1
@@ -607,7 +604,11 @@ static QMap<QByteArray, QString> _q_mapF
a0fe3d1
         unsigned char *data = 0;
a0fe3d1
         int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e));
a0fe3d1
         info.insertMulti(name, QString::fromUtf8((char*)data, size));
a0fe3d1
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
a0fe3d1
+	q_CRYPTO_free(data, OPENSSL_FILE, OPENSSL_LINE);
a0fe3d1
+#else
a0fe3d1
         q_CRYPTO_free(data);
a0fe3d1
+#endif
a0fe3d1
     }
a0fe3d1
 
a0fe3d1
     return info;
a0fe3d1
diff -up qtbase-opensource-src-5.7.1/src/network/ssl/qsslcontext_openssl.cpp.openssl11 qtbase-opensource-src-5.7.1/src/network/ssl/qsslcontext_openssl.cpp
a0fe3d1
--- qtbase-opensource-src-5.7.1/src/network/ssl/qsslcontext_openssl.cpp.openssl11	2016-11-17 14:34:21.000000000 -0500
0434621
+++ qtbase-opensource-src-5.7.1/src/network/ssl/qsslcontext_openssl.cpp	2016-11-24 07:51:02.131933265 -0500
a0fe3d1
@@ -110,7 +110,7 @@ void QSslContext::initSslContext(QSslCon
a0fe3d1
 init_context:
a0fe3d1
     switch (sslContext->sslConfiguration.protocol()) {
a0fe3d1
     case QSsl::SslV2:
a0fe3d1
-#ifndef OPENSSL_NO_SSL2
a0fe3d1
+#if !defined(OPENSSL_NO_SSL2) && OPENSSL_VERSION_NUMBER < 0x10100000L
a0fe3d1
         sslContext->ctx = q_SSL_CTX_new(client ? q_SSLv2_client_method() : q_SSLv2_server_method());
a0fe3d1
 #else
a0fe3d1
         // SSL 2 not supported by the system, but chosen deliberately -> error
a0fe3d1
@@ -331,7 +331,7 @@ init_context:
a0fe3d1
     q_DH_free(dh);
a0fe3d1
 
a0fe3d1
 #ifndef OPENSSL_NO_EC
a0fe3d1
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
a0fe3d1
+#if OPENSSL_VERSION_NUMBER >= 0x10002000L && OPENSSL_VERSION_NUMBER < 0x10100000L
a0fe3d1
     if (q_SSLeay() >= 0x10002000L) {
a0fe3d1
         q_SSL_CTX_ctrl(sslContext->ctx, SSL_CTRL_SET_ECDH_AUTO, 1, NULL);
a0fe3d1
     } else
a0fe3d1
@@ -487,7 +487,7 @@ bool QSslContext::cacheSession(SSL* ssl)
a0fe3d1
             unsigned char *data = reinterpret_cast<unsigned char *>(m_sessionASN1.data());
a0fe3d1
             if (!q_i2d_SSL_SESSION(session, &data))
a0fe3d1
                 qCWarning(lcSsl, "could not store persistent version of SSL session");
a0fe3d1
-            m_sessionTicketLifeTimeHint = session->tlsext_tick_lifetime_hint;
a0fe3d1
+            m_sessionTicketLifeTimeHint = SSL_SESSION_get_ticket_lifetime_hint(session);
a0fe3d1
         }
a0fe3d1
     }
a0fe3d1
 
a0fe3d1
diff -up qtbase-opensource-src-5.7.1/src/network/ssl/qsslkey_openssl.cpp.openssl11 qtbase-opensource-src-5.7.1/src/network/ssl/qsslkey_openssl.cpp
a0fe3d1
--- qtbase-opensource-src-5.7.1/src/network/ssl/qsslkey_openssl.cpp.openssl11	2016-11-17 14:34:21.000000000 -0500
0434621
+++ qtbase-opensource-src-5.7.1/src/network/ssl/qsslkey_openssl.cpp	2016-11-24 07:51:02.141933439 -0500
a0fe3d1
@@ -84,28 +84,26 @@ void QSslKeyPrivate::clear(bool deep)
a0fe3d1
 
a0fe3d1
 bool QSslKeyPrivate::fromEVP_PKEY(EVP_PKEY *pkey)
a0fe3d1
 {
a0fe3d1
-    if (pkey->type == EVP_PKEY_RSA) {
a0fe3d1
+    if (EVP_PKEY_base_id(pkey) == EVP_PKEY_RSA) {
a0fe3d1
         isNull = false;
a0fe3d1
         algorithm = QSsl::Rsa;
a0fe3d1
         type = QSsl::PrivateKey;
a0fe3d1
 
a0fe3d1
-        rsa = q_RSA_new();
a0fe3d1
-        memcpy(rsa, q_EVP_PKEY_get1_RSA(pkey), sizeof(RSA));
a0fe3d1
+        rsa = q_EVP_PKEY_get1_RSA(pkey);
a0fe3d1
 
a0fe3d1
         return true;
a0fe3d1
     }
a0fe3d1
-    else if (pkey->type == EVP_PKEY_DSA) {
a0fe3d1
+    else if (EVP_PKEY_base_id(pkey) == EVP_PKEY_DSA) {
a0fe3d1
         isNull = false;
a0fe3d1
         algorithm = QSsl::Dsa;
a0fe3d1
         type = QSsl::PrivateKey;
a0fe3d1
 
a0fe3d1
-        dsa = q_DSA_new();
a0fe3d1
-        memcpy(dsa, q_EVP_PKEY_get1_DSA(pkey), sizeof(DSA));
a0fe3d1
+        dsa = q_EVP_PKEY_get1_DSA(pkey);
a0fe3d1
 
a0fe3d1
         return true;
a0fe3d1
     }
a0fe3d1
 #ifndef OPENSSL_NO_EC
a0fe3d1
-    else if (pkey->type == EVP_PKEY_EC) {
a0fe3d1
+    else if (EVP_PKEY_base_id(pkey) == EVP_PKEY_EC) {
a0fe3d1
         isNull = false;
a0fe3d1
         algorithm = QSsl::Ec;
a0fe3d1
         type = QSsl::PrivateKey;
a0fe3d1
@@ -178,8 +176,8 @@ int QSslKeyPrivate::length() const
a0fe3d1
         return -1;
a0fe3d1
 
a0fe3d1
     switch (algorithm) {
a0fe3d1
-        case QSsl::Rsa: return q_BN_num_bits(rsa->n);
a0fe3d1
-        case QSsl::Dsa: return q_BN_num_bits(dsa->p);
a0fe3d1
+        case QSsl::Rsa: return q_RSA_bits(rsa);
a0fe3d1
+        case QSsl::Dsa: return q_DSA_bits(dsa);
a0fe3d1
 #ifndef OPENSSL_NO_EC
a0fe3d1
         case QSsl::Ec: return q_EC_GROUP_get_degree(q_EC_KEY_get0_group(ec));
a0fe3d1
 #endif
a0fe3d1
@@ -273,7 +271,7 @@ Qt::HANDLE QSslKeyPrivate::handle() cons
a0fe3d1
 
a0fe3d1
 static QByteArray doCrypt(QSslKeyPrivate::Cipher cipher, const QByteArray &data, const QByteArray &key, const QByteArray &iv, int enc)
a0fe3d1
 {
a0fe3d1
-    EVP_CIPHER_CTX ctx;
a0fe3d1
+    EVP_CIPHER_CTX *ctx = EVP_CIPHER_CTX_new();
a0fe3d1
     const EVP_CIPHER* type = 0;
a0fe3d1
     int i = 0, len = 0;
a0fe3d1
 
a0fe3d1
@@ -291,21 +289,22 @@ static QByteArray doCrypt(QSslKeyPrivate
a0fe3d1
 
a0fe3d1
     QByteArray output;
a0fe3d1
     output.resize(data.size() + EVP_MAX_BLOCK_LENGTH);
a0fe3d1
-    q_EVP_CIPHER_CTX_init(&ctx;;
a0fe3d1
-    q_EVP_CipherInit(&ctx, type, NULL, NULL, enc);
a0fe3d1
-    q_EVP_CIPHER_CTX_set_key_length(&ctx, key.size());
a0fe3d1
+    q_EVP_CIPHER_CTX_init(ctx);
a0fe3d1
+    q_EVP_CipherInit(ctx, type, NULL, NULL, enc);
a0fe3d1
+    q_EVP_CIPHER_CTX_set_key_length(ctx, key.size());
a0fe3d1
     if (cipher == QSslKeyPrivate::Rc2Cbc)
a0fe3d1
-        q_EVP_CIPHER_CTX_ctrl(&ctx, EVP_CTRL_SET_RC2_KEY_BITS, 8 * key.size(), NULL);
a0fe3d1
-    q_EVP_CipherInit(&ctx, NULL,
a0fe3d1
+        q_EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_SET_RC2_KEY_BITS, 8 * key.size(), NULL);
a0fe3d1
+    q_EVP_CipherInit(ctx, NULL,
a0fe3d1
         reinterpret_cast<const unsigned char *>(key.constData()),
a0fe3d1
         reinterpret_cast<const unsigned char *>(iv.constData()), enc);
a0fe3d1
-    q_EVP_CipherUpdate(&ctx,
a0fe3d1
+    q_EVP_CipherUpdate(ctx,
a0fe3d1
         reinterpret_cast<unsigned char *>(output.data()), &len,
a0fe3d1
         reinterpret_cast<const unsigned char *>(data.constData()), data.size());
a0fe3d1
-    q_EVP_CipherFinal(&ctx,
a0fe3d1
+    q_EVP_CipherFinal(ctx,
a0fe3d1
         reinterpret_cast<unsigned char *>(output.data()) + len, &i);
a0fe3d1
     len += i;
a0fe3d1
-    q_EVP_CIPHER_CTX_cleanup(&ctx;;
a0fe3d1
+    q_EVP_CIPHER_CTX_cleanup(ctx);
a0fe3d1
+    EVP_CIPHER_CTX_free(ctx);
a0fe3d1
 
a0fe3d1
     return output.left(len);
a0fe3d1
 }
a0fe3d1
diff -up qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl.cpp.openssl11 qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl.cpp
a0fe3d1
--- qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl.cpp.openssl11	2016-11-17 14:34:21.000000000 -0500
0434621
+++ qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl.cpp	2016-11-24 07:51:02.141933439 -0500
a0fe3d1
@@ -1519,7 +1519,7 @@ void QSslSocketBackendPrivate::continueH
a0fe3d1
     if (readBufferMaxSize)
a0fe3d1
         plainSocket->setReadBufferSize(readBufferMaxSize);
a0fe3d1
 
a0fe3d1
-    if (q_SSL_ctrl((ssl), SSL_CTRL_GET_SESSION_REUSED, 0, NULL))
a0fe3d1
+    if (SSL_session_reused(ssl))
a0fe3d1
         configuration.peerSessionShared = true;
a0fe3d1
 
a0fe3d1
 #ifdef QT_DECRYPT_SSL_TRAFFIC
a0fe3d1
diff -up qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl_symbols.cpp.openssl11 qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl_symbols.cpp
a0fe3d1
--- qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl_symbols.cpp.openssl11	2016-11-17 14:34:21.000000000 -0500
0434621
+++ qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl_symbols.cpp	2016-11-25 14:31:49.468240957 -0500
a0fe3d1
@@ -145,10 +145,15 @@ DEFINEFUNC(int, ASN1_STRING_length, ASN1
a0fe3d1
 DEFINEFUNC2(int, ASN1_STRING_to_UTF8, unsigned char **a, a, ASN1_STRING *b, b, return 0, return);
a0fe3d1
 DEFINEFUNC4(long, BIO_ctrl, BIO *a, a, int b, b, long c, c, void *d, d, return -1, return)
a0fe3d1
 DEFINEFUNC(int, BIO_free, BIO *a, a, return 0, return)
a0fe3d1
-DEFINEFUNC(BIO *, BIO_new, BIO_METHOD *a, a, return 0, return)
a0fe3d1
 DEFINEFUNC2(BIO *, BIO_new_mem_buf, void *a, a, int b, b, return 0, return)
a0fe3d1
 DEFINEFUNC3(int, BIO_read, BIO *a, a, void *b, b, int c, c, return -1, return)
a0fe3d1
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
a0fe3d1
+DEFINEFUNC(const BIO *, BIO_new, BIO_METHOD *a, a, return 0, return)
a0fe3d1
+DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return)
a0fe3d1
+#else
a0fe3d1
+DEFINEFUNC(BIO *, BIO_new, BIO_METHOD *a, a, return 0, return)
a0fe3d1
 DEFINEFUNC(BIO_METHOD *, BIO_s_mem, void, DUMMYARG, return 0, return)
a0fe3d1
+#endif
a0fe3d1
 DEFINEFUNC3(int, BIO_write, BIO *a, a, const void *b, b, int c, c, return -1, return)
a0fe3d1
 DEFINEFUNC(int, BN_num_bits, const BIGNUM *a, a, return 0, return)
a0fe3d1
 #ifndef OPENSSL_NO_EC
0434621
@@ -158,9 +163,15 @@ DEFINEFUNC(int, EC_GROUP_get_degree, con
a0fe3d1
 DEFINEFUNC(int, CRYPTO_num_locks, DUMMYARG, DUMMYARG, return 0, return)
a0fe3d1
 DEFINEFUNC(void, CRYPTO_set_locking_callback, void (*a)(int, int, const char *, int), a, return, DUMMYARG)
a0fe3d1
 DEFINEFUNC(void, CRYPTO_set_id_callback, unsigned long (*a)(), a, return, DUMMYARG)
a0fe3d1
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
a0fe3d1
+DEFINEFUNC3(void, CRYPTO_free, void *a, a, const char *b, b, int c, c, return, DUMMYARG)
a0fe3d1
+#else
a0fe3d1
 DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG)
a0fe3d1
+#endif
a0fe3d1
 DEFINEFUNC(DSA *, DSA_new, DUMMYARG, DUMMYARG, return 0, return)
a0fe3d1
 DEFINEFUNC(void, DSA_free, DSA *a, a, return, DUMMYARG)
0434621
+DEFINEFUNC(int, RSA_bits, const RSA *a, a, return 0, return)
0434621
+DEFINEFUNC(int, DSA_bits, const DSA *a, a, return 0, return)
a0fe3d1
 DEFINEFUNC3(X509 *, d2i_X509, X509 **a, a, const unsigned char **b, b, long c, c, return 0, return)
0434621
 DEFINEFUNC2(char *, ERR_error_string, unsigned long a, a, char *b, b, return 0, return)
0434621
 DEFINEFUNC(unsigned long, ERR_get_error, DUMMYARG, DUMMYARG, return 0, return)
0434621
@@ -182,6 +193,8 @@ DEFINEFUNC2(int, EVP_PKEY_set1_DSA, EVP_
0434621
 DEFINEFUNC2(int, EVP_PKEY_set1_EC_KEY, EVP_PKEY *a, a, EC_KEY *b, b, return -1, return)
a0fe3d1
 #endif
0434621
 DEFINEFUNC(void, EVP_PKEY_free, EVP_PKEY *a, a, return, DUMMYARG)
0434621
+DEFINEFUNC(DSA *, EVP_PKEY_get0_DSA, EVP_PKEY *a, a, return 0, return)
0434621
+DEFINEFUNC(RSA *, EVP_PKEY_get0_RSA, EVP_PKEY *a, a, return 0, return)
0434621
 DEFINEFUNC(DSA *, EVP_PKEY_get1_DSA, EVP_PKEY *a, a, return 0, return)
0434621
 DEFINEFUNC(RSA *, EVP_PKEY_get1_RSA, EVP_PKEY *a, a, return 0, return)
0434621
 #ifndef OPENSSL_NO_EC
0434621
@@ -432,6 +445,9 @@ DEFINEFUNC2(size_t, EC_get_builtin_curve
a0fe3d1
 DEFINEFUNC(int, EC_curve_nist2nid, const char *name, name, return 0, return)
a0fe3d1
 #endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
a0fe3d1
 #endif // OPENSSL_NO_EC
a0fe3d1
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
a0fe3d1
+DEFINEFUNC2(long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, long options, options, return 0, return)
a0fe3d1
+#endif // OPENSSL_VERSION_NUMBER >= 0x10100000L
a0fe3d1
 
a0fe3d1
 DEFINEFUNC5(int, PKCS12_parse, PKCS12 *p12, p12, const char *pass, pass, EVP_PKEY **pkey, pkey, \
a0fe3d1
             X509 **cert, cert, STACK_OF(X509) **ca, ca, return 1, return);
0434621
@@ -774,6 +790,7 @@ bool q_resolveOpenSslSymbols()
a0fe3d1
     RESOLVEFUNC(CRYPTO_set_locking_callback)
a0fe3d1
     RESOLVEFUNC(DSA_new)
a0fe3d1
     RESOLVEFUNC(DSA_free)
a0fe3d1
+    RESOLVEFUNC(DSA_bits)
a0fe3d1
     RESOLVEFUNC(ERR_error_string)
a0fe3d1
     RESOLVEFUNC(ERR_get_error)
a0fe3d1
     RESOLVEFUNC(ERR_free_strings)
0434621
@@ -795,7 +812,9 @@ bool q_resolveOpenSslSymbols()
a0fe3d1
 #endif
a0fe3d1
     RESOLVEFUNC(EVP_PKEY_free)
a0fe3d1
     RESOLVEFUNC(EVP_PKEY_get1_DSA)
a0fe3d1
+    RESOLVEFUNC(EVP_PKEY_get0_DSA)
a0fe3d1
     RESOLVEFUNC(EVP_PKEY_get1_RSA)
a0fe3d1
+    RESOLVEFUNC(EVP_PKEY_get0_RSA)
a0fe3d1
 #ifndef OPENSSL_NO_EC
a0fe3d1
     RESOLVEFUNC(EVP_PKEY_get1_EC_KEY)
a0fe3d1
 #endif
0434621
@@ -836,6 +855,7 @@ bool q_resolveOpenSslSymbols()
a0fe3d1
     RESOLVEFUNC(RAND_status)
a0fe3d1
     RESOLVEFUNC(RSA_new)
a0fe3d1
     RESOLVEFUNC(RSA_free)
a0fe3d1
+    RESOLVEFUNC(RSA_bits)
a0fe3d1
     RESOLVEFUNC(sk_new_null)
a0fe3d1
     RESOLVEFUNC(sk_push)
a0fe3d1
     RESOLVEFUNC(sk_free)
a0fe3d1
diff -up qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl_symbols_p.h.openssl11 qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl_symbols_p.h
a0fe3d1
--- qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl_symbols_p.h.openssl11	2016-11-17 14:34:21.000000000 -0500
0434621
+++ qtbase-opensource-src-5.7.1/src/network/ssl/qsslsocket_openssl_symbols_p.h	2016-11-24 07:51:02.141933439 -0500
a0fe3d1
@@ -221,10 +221,15 @@ int q_ASN1_STRING_length(ASN1_STRING *a)
a0fe3d1
 int q_ASN1_STRING_to_UTF8(unsigned char **a, ASN1_STRING *b);
a0fe3d1
 long q_BIO_ctrl(BIO *a, int b, long c, void *d);
a0fe3d1
 int q_BIO_free(BIO *a);
a0fe3d1
-BIO *q_BIO_new(BIO_METHOD *a);
a0fe3d1
 BIO *q_BIO_new_mem_buf(void *a, int b);
a0fe3d1
 int q_BIO_read(BIO *a, void *b, int c);
a0fe3d1
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
a0fe3d1
+BIO *q_BIO_new(const BIO_METHOD *a);
a0fe3d1
+const BIO_METHOD *q_BIO_s_mem();
a0fe3d1
+#else
a0fe3d1
+BIO *q_BIO_new(BIO_METHOD *a);
a0fe3d1
 BIO_METHOD *q_BIO_s_mem();
a0fe3d1
+#endif
a0fe3d1
 int q_BIO_write(BIO *a, const void *b, int c);
a0fe3d1
 int q_BN_num_bits(const BIGNUM *a);
a0fe3d1
 #ifndef OPENSSL_NO_EC
a0fe3d1
@@ -234,8 +239,13 @@ int q_EC_GROUP_get_degree(const EC_GROUP
a0fe3d1
 int q_CRYPTO_num_locks();
a0fe3d1
 void q_CRYPTO_set_locking_callback(void (*a)(int, int, const char *, int));
a0fe3d1
 void q_CRYPTO_set_id_callback(unsigned long (*a)());
a0fe3d1
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
a0fe3d1
+void q_CRYPTO_free(void *a, const char *b, int c);
a0fe3d1
+#else
a0fe3d1
 void q_CRYPTO_free(void *a);
a0fe3d1
+#endif
a0fe3d1
 DSA *q_DSA_new();
a0fe3d1
+int q_DSA_bits(const DSA *d);
a0fe3d1
 void q_DSA_free(DSA *a);
a0fe3d1
 X509 *q_d2i_X509(X509 **a, const unsigned char **b, long c);
a0fe3d1
 char *q_ERR_error_string(unsigned long a, char *b);
a0fe3d1
@@ -259,7 +269,9 @@ int q_EVP_PKEY_set1_EC_KEY(EVP_PKEY *a,
a0fe3d1
 #endif
a0fe3d1
 void q_EVP_PKEY_free(EVP_PKEY *a);
a0fe3d1
 RSA *q_EVP_PKEY_get1_RSA(EVP_PKEY *a);
a0fe3d1
+RSA *q_EVP_PKEY_get0_RSA(EVP_PKEY *a);
a0fe3d1
 DSA *q_EVP_PKEY_get1_DSA(EVP_PKEY *a);
a0fe3d1
+DSA *q_EVP_PKEY_get0_DSA(EVP_PKEY *a);
a0fe3d1
 #ifndef OPENSSL_NO_EC
a0fe3d1
 EC_KEY *q_EVP_PKEY_get1_EC_KEY(EVP_PKEY *a);
a0fe3d1
 #endif
a0fe3d1
@@ -306,6 +318,7 @@ int q_PEM_write_bio_EC_PUBKEY(BIO *a, EC
a0fe3d1
 void q_RAND_seed(const void *a, int b);
a0fe3d1
 int q_RAND_status();
a0fe3d1
 RSA *q_RSA_new();
a0fe3d1
+int q_RSA_bits(const RSA *r);
a0fe3d1
 void q_RSA_free(RSA *a);
a0fe3d1
 int q_sk_num(STACK *a);
a0fe3d1
 void q_sk_pop_free(STACK *a, void (*b)(void *));
a0fe3d1
@@ -378,7 +391,7 @@ typedef unsigned int (*q_psk_client_call
a0fe3d1
 void q_SSL_set_psk_client_callback(SSL *ssl, q_psk_client_callback_t callback);
a0fe3d1
 #endif // OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_PSK)
a0fe3d1
 #if OPENSSL_VERSION_NUMBER >= 0x10000000L
a0fe3d1
-#ifndef OPENSSL_NO_SSL2
a0fe3d1
+#if !defined(OPENSSL_NO_SSL2) && OPENSSL_VERSION_NUMBER < 0x10100000L
a0fe3d1
 const SSL_METHOD *q_SSLv2_client_method();
a0fe3d1
 #endif
a0fe3d1
 #ifndef OPENSSL_NO_SSL3_METHOD
a0fe3d1
@@ -388,7 +401,7 @@ const SSL_METHOD *q_SSLv23_client_method
a0fe3d1
 const SSL_METHOD *q_TLSv1_client_method();
a0fe3d1
 const SSL_METHOD *q_TLSv1_1_client_method();
a0fe3d1
 const SSL_METHOD *q_TLSv1_2_client_method();
a0fe3d1
-#ifndef OPENSSL_NO_SSL2
a0fe3d1
+#if !defined(OPENSSL_NO_SSL2) && OPENSSL_VERSION_NUMBER < 0x10100000L
a0fe3d1
 const SSL_METHOD *q_SSLv2_server_method();
a0fe3d1
 #endif
a0fe3d1
 #ifndef OPENSSL_NO_SSL3_METHOD
a0fe3d1
@@ -519,7 +532,11 @@ DSA *q_d2i_DSAPrivateKey(DSA **a, unsign
a0fe3d1
         PEM_ASN1_write_bio((int (*)(void*, unsigned char**))q_i2d_DSAPrivateKey,PEM_STRING_DSA,\
a0fe3d1
                            bp,(char *)x,enc,kstr,klen,cb,u)
a0fe3d1
 #endif
a0fe3d1
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
a0fe3d1
 #define q_SSL_CTX_set_options(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_OPTIONS,(op),NULL)
a0fe3d1
+#else
a0fe3d1
+long q_SSL_CTX_set_options(SSL_CTX *ctx, long options);
a0fe3d1
+#endif
a0fe3d1
 #define q_SSL_CTX_set_mode(ctx,op) q_SSL_CTX_ctrl((ctx),SSL_CTRL_MODE,(op),NULL)
a0fe3d1
 #define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_sk_num)(st)
a0fe3d1
 #define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_sk_value)(st, i)