Ignore:
Timestamp:
1/2/2009 10:46:23 AM (3 years ago)
Author:
lowjoel
Message:

Implemented Authenticode verification using Authenticode APIs instead of the X509Certificate2 class which never verified our certs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Manager/Plugins.cs

    r672 r845  
    270270            IsCore = false; 
    271271 
    272             try 
    273             { 
    274                 //Try to load the certificate to see if it exists; exceptions will be 
    275                 //thrown if the assembly is not signed. 
     272            //Verify the certificate in the assembly. 
     273            if (WintrustAPI.VerifyAuthenticode(assembly.Location)) 
     274            { 
    276275                X509Certificate2 cert = new X509Certificate2( 
    277276                    X509Certificate.CreateFromSignedFile(assembly.Location)); 
    278  
    279                 //Verify the validity of the certificate 
    280                 if (cert.Verify()) 
    281                     AssemblyAuthenticode = cert; 
    282             } 
    283             catch (CryptographicException) 
    284             { 
     277                AssemblyAuthenticode = cert; 
    285278            } 
    286279        } 
Note: See TracChangeset for help on using the changeset viewer.