Fix inconsistency between the #if guards in SSL PSK code

The declaration and definition of the forwarding functions for PSK
differed which leads to link errors with some versions of openssl.

Change-Id: I40410f62a584c5dbd2acf5c90422e1243514f8fd
Reviewed-by: Richard J. Moore <rich@kde.org>
This commit is contained in:
Liang Qi 2016-06-22 22:05:47 +02:00
parent 4b0cb35b84
commit 0f4affc0b1

View File

@ -367,10 +367,10 @@ int q_SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, CRYPT
int q_SSL_set_ex_data(SSL *ssl, int idx, void *arg);
void *q_SSL_get_ex_data(const SSL *ssl, int idx);
#endif
#ifndef OPENSSL_NO_PSK
#if OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_PSK)
typedef unsigned int (*q_psk_client_callback_t)(SSL *ssl, const char *hint, char *identity, unsigned int max_identity_len, unsigned char *psk, unsigned int max_psk_len);
void q_SSL_set_psk_client_callback(SSL *ssl, q_psk_client_callback_t callback);
#endif // OPENSSL_NO_PSK
#endif // OPENSSL_VERSION_NUMBER >= 0x10001000L && !defined(OPENSSL_NO_PSK)
#if OPENSSL_VERSION_NUMBER >= 0x10000000L
#ifndef OPENSSL_NO_SSL2
const SSL_METHOD *q_SSLv2_client_method();