|
@@ -4376,13 +4376,19 @@ bool __fastcall TFTPFileSystem::HandleAsynchRequestVerifyCertificate(
|
|
// as it can take a very long time (up to 1 minute).
|
|
// as it can take a very long time (up to 1 minute).
|
|
if (!VerificationResult && TryWindowsSystemCertificateStore)
|
|
if (!VerificationResult && TryWindowsSystemCertificateStore)
|
|
{
|
|
{
|
|
- if (WindowsValidateCertificate(Data.Certificate, Data.CertificateLen))
|
|
|
|
|
|
+ UnicodeString WindowsCertificateError;
|
|
|
|
+ if (WindowsValidateCertificate(Data.Certificate, Data.CertificateLen, WindowsCertificateError))
|
|
{
|
|
{
|
|
FTerminal->LogEvent(L"Certificate verified against Windows certificate store");
|
|
FTerminal->LogEvent(L"Certificate verified against Windows certificate store");
|
|
VerificationResult = true;
|
|
VerificationResult = true;
|
|
// certificate is trusted for all purposes
|
|
// certificate is trusted for all purposes
|
|
Trusted = true;
|
|
Trusted = true;
|
|
}
|
|
}
|
|
|
|
+ else
|
|
|
|
+ {
|
|
|
|
+ FTerminal->LogEvent(
|
|
|
|
+ FORMAT(L"Certificate failed to verify against Windows certificate store: %s", (DefaultStr(WindowsCertificateError, L"no details"))));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
const UnicodeString SummarySeparator = L"\n\n";
|
|
const UnicodeString SummarySeparator = L"\n\n";
|