Changeset 845


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

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

Location:
branches/eraser6
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • branches/eraser6/Manager/Manager.csproj

    r633 r845  
    4040    </Reference> 
    4141    <Reference Include="System.Data" /> 
     42    <Reference Include="System.Security" /> 
    4243    <Reference Include="System.Windows.Forms" /> 
    4344    <Reference Include="System.Xml" /> 
  • 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        } 
  • branches/eraser6/Util/Util.csproj

    r795 r845  
    6060    <Compile Include="Properties\AssemblyInfo.cs" /> 
    6161    <Compile Include="UserAPI.cs" /> 
     62    <Compile Include="WintrustAPI.cs" /> 
    6263  </ItemGroup> 
    6364  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> 
Note: See TracChangeset for help on using the changeset viewer.