diff options
author | Mikkel Krautz <mikkel@krautz.dk> | 2017-05-07 00:47:46 +0300 |
---|---|---|
committer | Mikkel Krautz <mikkel@krautz.dk> | 2017-05-07 00:47:46 +0300 |
commit | 2a08974eb4e9883a916d1837101de9b9ae00417c (patch) | |
tree | 55dcdc6dfe62e3215682f82c80ccac702e940b5f /src/murmur | |
parent | 0cffca1200bfb3cc9c68b23c28a211cdafa2b4c9 (diff) |
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.
Diffstat (limited to 'src/murmur')
-rw-r--r-- | src/murmur/Cert.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/src/murmur/Cert.cpp b/src/murmur/Cert.cpp index d8ab8776b..68f93d2ec 100644 --- a/src/murmur/Cert.cpp +++ b/src/murmur/Cert.cpp @@ -10,6 +10,21 @@ #define SSL_STRING(x) QString::fromLatin1(x).toUtf8().data() +static int add_ext(X509 * crt, int nid, char *value) { + X509_EXTENSION *ex; + X509V3_CTX ctx; + X509V3_set_ctx_nodb(&ctx); + X509V3_set_ctx(&ctx, crt, crt, NULL, NULL, 0); + ex = X509V3_EXT_conf_nid(NULL, &ctx, nid, value); + if (!ex) + return 0; + + X509_add_ext(crt, ex, -1); + X509_EXTENSION_free(ex); + return 1; +} + +#if defined(USE_QSSLDIFFIEHELLMANPARAMETERS) static BN_GENCB *mumble_BN_GENCB_new() { #if OPENSSL_VERSION >= 0x10100000L return BN_GENCB_new(); @@ -26,21 +41,6 @@ static void mumble_BN_GENCB_free(BN_GENCB *cb) { #endif } -static int add_ext(X509 * crt, int nid, char *value) { - X509_EXTENSION *ex; - X509V3_CTX ctx; - X509V3_set_ctx_nodb(&ctx); - X509V3_set_ctx(&ctx, crt, crt, NULL, NULL, 0); - ex = X509V3_EXT_conf_nid(NULL, &ctx, nid, value); - if (!ex) - return 0; - - X509_add_ext(crt, ex, -1); - X509_EXTENSION_free(ex); - return 1; -} - -#if defined(USE_QSSLDIFFIEHELLMANPARAMETERS) // 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 |