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,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(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(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