summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/network/ssl/qsslcertificate.cpp4
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols.cpp3
-rw-r--r--src/network/ssl/qsslsocket_openssl_symbols_p.h6
3 files changed, 10 insertions, 3 deletions
diff --git a/src/network/ssl/qsslcertificate.cpp b/src/network/ssl/qsslcertificate.cpp
index 2d5ebcf..821d7c6 100644
--- a/src/network/ssl/qsslcertificate.cpp
+++ b/src/network/ssl/qsslcertificate.cpp
@@ -395,7 +395,11 @@ QMultiMap<QSsl::AlternateNameEntryType, QString> QSslCertificate::alternateSubje
else if (genName->type == GEN_EMAIL)
result.insert(QSsl::EmailEntry, altName);
}
+#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+ q_sk_pop_free((STACK*)altNames, reinterpret_cast<void(*)(void*)>(q_sk_free));
+#else
q_sk_pop_free((STACK*)altNames, q_sk_free);
+#endif
}
return result;
diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
index e504b23..0762752 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
+++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -143,12 +143,13 @@ DEFINEFUNC2(int, PEM_write_bio_RSA_PUBKEY, BIO *a, a, RSA *b, b, return 0, retur
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)
-DEFINEFUNC(void, sk_free, STACK *a, a, return, DUMMYARG)
DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+DEFINEFUNC(void, sk_free, _STACK *a, a, return, DUMMYARG)
DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, return 0, return)
#else
+DEFINEFUNC(void, sk_free, STACK *a, a, return, DUMMYARG)
DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(STACK*), b, return, DUMMYARG)
DEFINEFUNC2(char *, sk_value, STACK *a, a, int b, b, return 0, return)
#endif
diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
index b739a42..8d71caa 100644
--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
+++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
@@ -255,12 +255,14 @@ int q_PEM_write_bio_RSA_PUBKEY(BIO *a, RSA *b);
void q_RAND_seed(const void *a, int b);
int q_RAND_status();
void q_RSA_free(RSA *a);
-void q_sk_free(STACK *a);
int q_sk_num(STACK *a);
-void q_sk_pop_free(STACK *a, void (*b)(STACK *));
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
+void q_sk_free(_STACK *a);
+void q_sk_pop_free(STACK *a, void (*b)(void *));
void * q_sk_value(STACK *a, int b);
#else
+void q_sk_free(STACK *a);
+void q_sk_pop_free(STACK *a, void (*b)(STACK *));
char * q_sk_value(STACK *a, int b);
#endif
int q_SSL_accept(SSL *a);