diff options
author | Bernhard Rosenkraenzer <bero@arklinux.ch> | 2009-09-09 11:40:51 (GMT) |
---|---|---|
committer | Peter Hartmann <peter.hartmann@trolltech.com> | 2009-09-09 11:40:51 (GMT) |
commit | 342e87fab8d62a8b8795a916ceedba6bba69959f (patch) | |
tree | 30a938af1919374b22303c48902248fdecfee1ea | |
parent | 67697199f0c9a9890b86d826e7193862aaad03b0 (diff) | |
download | Qt-342e87fab8d62a8b8795a916ceedba6bba69959f.zip Qt-342e87fab8d62a8b8795a916ceedba6bba69959f.tar.gz Qt-342e87fab8d62a8b8795a916ceedba6bba69959f.tar.bz2 |
Fix unresolved reference to q_sk_free with openssl 1.0
Previous fix introduced an unresolved reference in the lib
Merge-request: 1409
Reviewed-by: Peter Hartmann <peter.hartmann@trolltech.com>
-rw-r--r-- | src/network/ssl/qsslcertificate.cpp | 4 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket_openssl_symbols.cpp | 3 | ||||
-rw-r--r-- | src/network/ssl/qsslsocket_openssl_symbols_p.h | 6 |
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); |