private void CheckTimeStampCertPath(TimestampToken t, TimestampVerificationResult result, IValidationContext ctx, IAdvancedSignature signature) { try { result.CertPathUpToTrustedList.SetStatus(ResultStatus.INVALID, "$UI_Signatures_ValidationText_CannotReachTSL"); ctx.ValidateTimestamp(t, signature.CertificateSource, signature.CRLSource, signature.OCSPSource, result.UsedCerts); var tsSignerSubjectName = t.GetSignerSubjectName(); foreach (CertificateAndContext c in ctx.NeededCertificates) { if (c.Certificate.SubjectDN.Equals(tsSignerSubjectName)) { if (ctx.GetParentFromTrustedList(c) != null) { result.CertPathUpToTrustedList.SetStatus(ResultStatus.VALID, null); break; } } } } catch (IOException) { result.CertPathUpToTrustedList.SetStatus(ResultStatus.UNDETERMINED, "$UI_Signatures_ValidationText_ExceptionWhileVerifying"); } }