1
0
mirror of https://github.com/winscp/winscp.git synced 2026-10-24 02:28:55 +03:00

Providing more details when verification of the TLS certificate against Windows certificate store fails

Source commit: ae4f02bf530e8ca88ad2166c0cd9c46b3d3e80a5
This commit is contained in:
Martin Prikryl
2016-05-31 08:46:02 +00:00
parent d2a35a3cfa
commit a0a3e03326
7 changed files with 26 additions and 8 deletions

View File

@@ -2260,12 +2260,18 @@ bool TWebDAVFileSystem::VerifyCertificate(const TWebDAVCertificateData & Data)
if (!Result)
{
if (NeonWindowsValidateCertificate(Failures, Data.AsciiCert))
UnicodeString WindowsCertificateError;
if (NeonWindowsValidateCertificate(Failures, Data.AsciiCert, WindowsCertificateError))
{
FTerminal->LogEvent(L"Certificate verified against Windows certificate store");
// There can be also other flags, not just the NE_SSL_UNTRUSTED.
Result = (Failures == 0);
}
else
{
FTerminal->LogEvent(
FORMAT(L"Certificate failed to verify against Windows certificate store: %s", (DefaultStr(WindowsCertificateError, L"no details"))));
}
}
UnicodeString Summary;