From f5462cb6b71dcc10e8cb23c7416b80c6550bc106 Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Tue, 17 Apr 2018 19:37:50 +0200 Subject: [PATCH] Network: fix compile error occurring with MSVC 2008 (C89 standard) All of the variables have to be declared at the top of the function, as MSVC 2008 doesn't support the C99 standard. --- src/Mayaqua/Network.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Mayaqua/Network.c b/src/Mayaqua/Network.c index b6d339c7..b6fba840 100644 --- a/src/Mayaqua/Network.c +++ b/src/Mayaqua/Network.c @@ -5828,11 +5828,10 @@ int SslCertVerifyCallback(int preverify_ok, X509_STORE_CTX *ctx) if (clientcert != NULL) { - clientcert->PreverifyErr = 0; + clientcert->PreverifyErr = X509_STORE_CTX_get_error(ctx); clientcert->PreverifyErrMessage[0] = '\0'; if (!preverify_ok) { - clientcert->PreverifyErr = X509_STORE_CTX_get_error(ctx); const char *msg = X509_verify_cert_error_string(clientcert->PreverifyErr); StrCpy(clientcert->PreverifyErrMessage, PREVERIFY_ERR_MESSAGE_SIZE, msg); Debug("SslCertVerifyCallback preverify error: '%s'\n", msg);