We need to verify that binary files are signed properly with digital signature (Authenticode). This can be achieved with signtool.exe pretty easily. However, we need an auto
Thank you guys,
You help me a lot :)
BTW: I found simpler way how to obtain the time stamp.
here it is:
foreach (var signerInfo in signedCms.SignerInfos)
{
foreach (var unsignedAttribute in signerInfo.UnsignedAttributes)
{
if (unsignedAttribute.Oid.Value == WinCrypt.szOID_RSA_counterSign)
{
foreach (var counterSignInfo in signerInfo.CounterSignerInfos)
{
foreach (var signedAttribute in counterSignInfo.SignedAttributes)
{
if (signedAttribute.Oid.Value == WinCrypt.szOID_RSA_signingTime)
{
Pkcs9SigningTime signingTime = (Pkcs9SigningTime)signedAttribute.Values[0];
Console.Out.WriteLine("Signing Time UTC: " + signingTime.SigningTime);
}
}
}
return true;
}
}
}