1
0
mirror of https://github.com/SoftEtherVPN/SoftEtherVPN.git synced 2024-11-25 02:49:52 +03:00

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.
This commit is contained in:
Davide Beatrici 2018-04-17 19:37:50 +02:00
parent 478270efba
commit f5462cb6b7

View File

@ -5828,11 +5828,10 @@ int SslCertVerifyCallback(int preverify_ok, X509_STORE_CTX *ctx)
if (clientcert != NULL) if (clientcert != NULL)
{ {
clientcert->PreverifyErr = 0; clientcert->PreverifyErr = X509_STORE_CTX_get_error(ctx);
clientcert->PreverifyErrMessage[0] = '\0'; clientcert->PreverifyErrMessage[0] = '\0';
if (!preverify_ok) if (!preverify_ok)
{ {
clientcert->PreverifyErr = X509_STORE_CTX_get_error(ctx);
const char *msg = X509_verify_cert_error_string(clientcert->PreverifyErr); const char *msg = X509_verify_cert_error_string(clientcert->PreverifyErr);
StrCpy(clientcert->PreverifyErrMessage, PREVERIFY_ERR_MESSAGE_SIZE, msg); StrCpy(clientcert->PreverifyErrMessage, PREVERIFY_ERR_MESSAGE_SIZE, msg);
Debug("SslCertVerifyCallback preverify error: '%s'\n", msg); Debug("SslCertVerifyCallback preverify error: '%s'\n", msg);