Index: qt/src/network/ssl/qsslsocket_openssl_symbols.cpp
--- qt/src/network/ssl/qsslsocket_openssl_symbols.cpp.orig
+++ qt/src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -106,8 +106,9 @@ QT_BEGIN_NAMESPACE
 DEFINEFUNC3(void *, ASN1_dup, i2d_of_void *a, a, d2i_of_void *b, b, char *c, c, return 0, return)
 #endif
 DEFINEFUNC(long, ASN1_INTEGER_get, ASN1_INTEGER *a, a, return 0, return)
-DEFINEFUNC(unsigned char *, ASN1_STRING_data, ASN1_STRING *a, a, return 0, return)
-DEFINEFUNC(int, ASN1_STRING_length, ASN1_STRING *a, a, return 0, return)
+DEFINEFUNC(const unsigned char *, ASN1_STRING_get0_data, const ASN1_STRING *a, a, return 0, return)
+DEFINEFUNC(int, ASN1_STRING_length, const ASN1_STRING *a, a, return 0, return)
+DEFINEFUNC(int, ASN1_STRING_type, const ASN1_STRING *a, a, return 0, return)
 DEFINEFUNC2(int, ASN1_STRING_to_UTF8, unsigned char **a, a, ASN1_STRING *b, b, return 0, return);
 DEFINEFUNC4(long, BIO_ctrl, BIO *a, a, int b, b, long c, c, void *d, d, return -1, return)
 DEFINEFUNC(int, BIO_free, BIO *a, a, return 0, return)
@@ -125,14 +126,10 @@ DEFINEFUNC(const BIO_METHOD *, BIO_s_mem, void, DUMMYA
 #endif
 DEFINEFUNC3(int, BIO_write, BIO *a, a, const void *b, b, int c, c, return -1, return)
 DEFINEFUNC(int, BN_num_bits, const BIGNUM *a, a, return 0, return)
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
 DEFINEFUNC(int, CRYPTO_num_locks, DUMMYARG, DUMMYARG, return 0, return)
 DEFINEFUNC(void, CRYPTO_set_locking_callback, void (*a)(int, int, const char *, int), a, return, DUMMYARG)
 DEFINEFUNC(void, CRYPTO_set_id_callback, unsigned long (*a)(), a, return, DUMMYARG)
 DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG)
-#else
-DEFINEFUNC(void, OPENSSL_free, void *a, a, return, DUMMYARG)
-#endif
 DEFINEFUNC(void, DSA_free, DSA *a, a, return, DUMMYARG)
 #if  OPENSSL_VERSION_NUMBER < 0x00908000L
 DEFINEFUNC3(X509 *, d2i_X509, X509 **a, a, unsigned char **b, b, long c, c, return 0, return)
@@ -169,7 +166,6 @@ DEFINEFUNC2(int, PEM_write_bio_RSA_PUBKEY, BIO *a, a, 
 DEFINEFUNC2(void, RAND_seed, const void *a, a, int b, b, return, DUMMYARG)
 DEFINEFUNC(int, RAND_status, void, DUMMYARG, return -1, return)
 DEFINEFUNC(void, RSA_free, RSA *a, a, return, DUMMYARG)
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
 DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
 DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
 #if OPENSSL_VERSION_NUMBER >= 0x10000000L
@@ -179,12 +175,6 @@ DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, r
 DEFINEFUNC(void, sk_free, STACK *a, a, return, DUMMYARG)
 DEFINEFUNC2(char *, sk_value, STACK *a, a, int b, b, return 0, return)
 #endif
-#else
-DEFINEFUNC(int, OPENSSL_sk_num, STACK *a, a, return -1, return)
-DEFINEFUNC2(void, OPENSSL_sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
-DEFINEFUNC(void, OPENSSL_sk_free, _STACK *a, a, return, DUMMYARG)
-DEFINEFUNC2(void *, OPENSSL_sk_value, STACK *a, a, int b, b, return 0, return)
-#endif
 DEFINEFUNC(int, SSL_accept, SSL *a, a, return -1, return)
 DEFINEFUNC(int, SSL_clear, SSL *a, a, return -1, return)
 DEFINEFUNC3(char *, SSL_CIPHER_description, SSL_CIPHER *a, a, char *b, b, int c, c, return 0, return)
@@ -236,7 +226,7 @@ DEFINEFUNC(long, SSL_get_verify_result, SSL *a, a, ret
 DEFINEFUNC(int, SSL_library_init, void, DUMMYARG, return -1, return)
 DEFINEFUNC(void, SSL_load_error_strings, void, DUMMYARG, return, DUMMYARG)
 #else
-DEFINEFUNC2(int, OPENSSL_init_ssl, uint64_t opts, opts, const OPENSSL_INIT_SETTINGS *settings, settings, return -1, return)
+DEFINEFUNC2(int, OPENSSL_init_ssl, uint64_t opts, opts, const void *settings, settings, return -1, return)
 #endif
 DEFINEFUNC(SSL *, SSL_new, SSL_CTX *a, a, return 0, return)
 #if OPENSSL_VERSION_NUMBER >= 0x0090806fL && !defined(OPENSSL_NO_TLSEXT)
@@ -325,7 +315,7 @@ DEFINEFUNC3(DSA *, d2i_DSAPrivateKey, DSA **a, a, unsi
 DEFINEFUNC(void, OPENSSL_add_all_algorithms_noconf, void, DUMMYARG, return, DUMMYARG)
 DEFINEFUNC(void, OPENSSL_add_all_algorithms_conf, void, DUMMYARG, return, DUMMYARG)
 #else
-DEFINEFUNC2(int, OPENSSL_init_crypto, uint64_t opts, opts, const OPENSSL_INIT_SETTINGS *settings, settings, return -1, return)
+DEFINEFUNC2(int, OPENSSL_init_crypto, uint64_t opts, opts, const void *settings, settings, return -1, return)
 #endif
 DEFINEFUNC3(int, SSL_CTX_load_verify_locations, SSL_CTX *ctx, ctx, const char *CAfile, CAfile, const char *CApath, CApath, return 0, return)
 #if OPENSSL_VERSION_NUMBER < 0x10100000L
@@ -336,15 +326,12 @@ DEFINEFUNC(unsigned long, OpenSSL_version_num, void, D
 DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *ctx, ctx, return 0, return)
 
 DEFINEFUNC(ASN1_INTEGER *, X509_get_serialNumber, X509 *x, x, return 0, return)
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
 DEFINEFUNC(int, EVP_PKEY_id, const EVP_PKEY *pkey, pkey, return 0, return)
 DEFINEFUNC(int, EVP_PKEY_base_id, const EVP_PKEY *pkey, pkey, return 0, return)
 DEFINEFUNC2(int, SSL_CIPHER_get_bits, const SSL_CIPHER *cipher, cipher, int *alg_bits, alg_bits, return 0, return)
-DEFINEFUNC2(long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, long options, options, return 0, return)
 DEFINEFUNC(long, X509_get_version, X509 *x, x, return 0, return)
 DEFINEFUNC(X509_PUBKEY *, X509_get_X509_PUBKEY, X509 *x, x, return 0, return)
 DEFINEFUNC(int, RSA_bits,  const RSA *rsa, rsa, return 0, return)
-DEFINEFUNC(int, DSA_security_bits, const DSA *dsa, dsa, return 0, return)
 #if OPENSSL_VERSION_NUMBER < 0x10100000L
 DEFINEFUNC(ASN1_TIME *, X509_get_notAfter, X509 *x, x, return 0, return)
 DEFINEFUNC(ASN1_TIME *, X509_get_notBefore, X509 *x, x, return 0, return)
@@ -353,7 +340,6 @@ DEFINEFUNC(ASN1_TIME *, X509_getm_notAfter, X509 *x, x
 DEFINEFUNC(ASN1_TIME *, X509_getm_notBefore, X509 *x, x, return 0, return)
 #endif
 DEFINEFUNC4(void, DSA_get0_pqg, const DSA *d, d, const BIGNUM **p, p, const BIGNUM **q, q, const BIGNUM **g, g, return, return)
-#endif
 
 #ifdef Q_OS_SYMBIAN
 #define RESOLVEFUNC(func, ordinal, lib) \
@@ -811,8 +797,9 @@ bool q_resolveOpenSslSymbols()
     RESOLVEFUNC(ASN1_dup)
 #endif
     RESOLVEFUNC(ASN1_INTEGER_get)
-    RESOLVEFUNC(ASN1_STRING_data)
+    RESOLVEFUNC(ASN1_STRING_get0_data)
     RESOLVEFUNC(ASN1_STRING_length)
+    RESOLVEFUNC(ASN1_STRING_type)
     RESOLVEFUNC(ASN1_STRING_to_UTF8)
     RESOLVEFUNC(BIO_ctrl)
     RESOLVEFUNC(BIO_free)
@@ -823,11 +810,9 @@ bool q_resolveOpenSslSymbols()
     RESOLVEFUNC(BIO_write)
     RESOLVEFUNC(BN_num_bits)
     RESOLVEFUNC(CRYPTO_free)
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
     RESOLVEFUNC(CRYPTO_num_locks)
     RESOLVEFUNC(CRYPTO_set_id_callback)
     RESOLVEFUNC(CRYPTO_set_locking_callback)
-#endif
     RESOLVEFUNC(DSA_free)
     RESOLVEFUNC(ERR_error_string)
     RESOLVEFUNC(ERR_get_error)
@@ -857,17 +842,10 @@ bool q_resolveOpenSslSymbols()
     RESOLVEFUNC(RAND_seed)
     RESOLVEFUNC(RAND_status)
     RESOLVEFUNC(RSA_free)
-#if OPENSSL_VERSION_NUMBER < 0x10100000L
     RESOLVEFUNC(sk_free)
     RESOLVEFUNC(sk_num)
     RESOLVEFUNC(sk_pop_free)
     RESOLVEFUNC(sk_value)
-#else
-    RESOLVEFUNC(OPENSSL_sk_free)
-    RESOLVEFUNC(OPENSSL_sk_num)
-    RESOLVEFUNC(OPENSSL_sk_pop_free)
-    RESOLVEFUNC(OPENSSL_sk_value)
-#endif
     RESOLVEFUNC(SSL_CIPHER_description)
     RESOLVEFUNC(SSL_CTX_check_private_key)
     RESOLVEFUNC(SSL_CTX_ctrl)
@@ -911,16 +889,13 @@ bool q_resolveOpenSslSymbols()
     RESOLVEFUNC(SSL_write)
 
     RESOLVEFUNC(X509_get_serialNumber)
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
     RESOLVEFUNC(SSL_CTX_ctrl)
     RESOLVEFUNC(EVP_PKEY_id)
     RESOLVEFUNC(EVP_PKEY_base_id)
     RESOLVEFUNC(SSL_CIPHER_get_bits)
-    RESOLVEFUNC(SSL_CTX_set_options)
     RESOLVEFUNC(X509_get_version)
     RESOLVEFUNC(X509_get_X509_PUBKEY)
     RESOLVEFUNC(RSA_bits)
-    RESOLVEFUNC(DSA_security_bits)
     RESOLVEFUNC(DSA_get0_pqg)
 #if OPENSSL_VERSION_NUMBER < 0x10100000L
     RESOLVEFUNC(X509_get_notAfter)
@@ -929,8 +904,6 @@ bool q_resolveOpenSslSymbols()
     RESOLVEFUNC(X509_getm_notAfter)
     RESOLVEFUNC(X509_getm_notBefore)
 #endif
-#endif
-
 #ifndef OPENSSL_NO_SSL2
     RESOLVEFUNC(SSLv2_client_method)
 #endif
@@ -1032,10 +1005,10 @@ bool q_resolveOpenSslSymbols()
 //==============================================================================
 QDateTime q_getTimeFromASN1(const ASN1_TIME *aTime)
 {
-    size_t lTimeLength = aTime->length;
-    char *pString = (char *) aTime->data;
+    size_t lTimeLength = q_ASN1_STRING_length(aTime);
+    const char *pString = (const char *) q_ASN1_STRING_get0_data(aTime);
 
-    if (aTime->type == V_ASN1_UTCTIME) {
+    if (q_ASN1_STRING_type(aTime) == V_ASN1_UTCTIME) {
 
         char lBuffer[24];
         char *pBuffer = lBuffer;
@@ -1095,7 +1068,7 @@ QDateTime q_getTimeFromASN1(const ASN1_TIME *aTime)
         result = result.addSecs(lSecondsFromUCT);
         return result;
 
-    } else if (aTime->type == V_ASN1_GENERALIZEDTIME) {
+    } else if (q_ASN1_STRING_type(aTime) == V_ASN1_GENERALIZEDTIME) {
 
         if (lTimeLength < 15)
             return QDateTime(); // hopefully never triggered
