What are the consequences of an expired digital signature of a C# assembly?

51 views Asked by At

When you look at the "Digital Signatures" tab of a C# assembly in using the "Properties" menu in Windows, it shows the timestamp on which the assembly was digitally signed.

While the certificate expiry date is not shown on this menu, it can be checked this way using reflection:

var assembly = Assembly.Load("C:\xyz.dll");
var signingCertificate = X509Certificate2.CreateFromSignedFile(assembly.Location);
var expiryDate = signingCertificate.NotAfter;

I read an article on difference between assembly strong naming and digital signatures but I still couldnt figure out what's the consequence of an expired certificate?

What happens if DateTime.Today.Date > expiryDate.Date?

0

There are 0 answers