Murmur: fix warning about unused mumble_BN_GENCB_new/mumble_BN_GENCB_free.

These functions are only used when the QSslDiffieHellmanParameters
class is available.

This commit moves the functions into an #if
defined(USE_QSSLDIFFIEHELLMANPARAMETERS) block.
This commit is contained in:
Mikkel Krautz 2017-05-06 23:47:46 +02:00
parent 0cffca1200
commit 2a08974eb4

View File

@ -10,22 +10,6 @@
#define SSL_STRING(x) QString::fromLatin1(x).toUtf8().data()
static BN_GENCB *mumble_BN_GENCB_new() {
#if OPENSSL_VERSION >= 0x10100000L
return BN_GENCB_new();
#else
return reinterpret_cast<BN_GENCB *>(malloc(sizeof(BN_GENCB)));
#endif
}
static void mumble_BN_GENCB_free(BN_GENCB *cb) {
#if OPENSSL_VERSION >= 0x10100000L
BN_GENCB_free(cb);
#else
free(cb);
#endif
}
static int add_ext(X509 * crt, int nid, char *value) {
X509_EXTENSION *ex;
X509V3_CTX ctx;
@ -41,6 +25,22 @@ static int add_ext(X509 * crt, int nid, char *value) {
}
#if defined(USE_QSSLDIFFIEHELLMANPARAMETERS)
static BN_GENCB *mumble_BN_GENCB_new() {
#if OPENSSL_VERSION >= 0x10100000L
return BN_GENCB_new();
#else
return reinterpret_cast<BN_GENCB *>(malloc(sizeof(BN_GENCB)));
#endif
}
static void mumble_BN_GENCB_free(BN_GENCB *cb) {
#if OPENSSL_VERSION >= 0x10100000L
BN_GENCB_free(cb);
#else
free(cb);
#endif
}
// dh_progress is a status callback for DH_generate_parameters_ex.
// We use it to run the event loop while generating DH params, in
// order to keep the Murmur GUI on Windows responsive during the