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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user