Changeset 2526
- Timestamp:
- 3/15/2012 12:51:46 AM (14 months ago)
- Location:
- trunk/eraser
- Files:
-
- 4 added
- 2 edited
-
Dependencies/Microsoft.Runtime.Hosting.Interop.dll (added)
-
Dependencies/Microsoft.Runtime.Hosting.Interop.pdb (added)
-
Dependencies/Microsoft.Runtime.Hosting.dll (added)
-
Dependencies/Microsoft.Runtime.Hosting.pdb (added)
-
Eraser.Util/Eraser.Util.csproj (modified) (2 diffs)
-
Eraser.Util/Security.cs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/eraser/Eraser.Util/Eraser.Util.csproj
r2514 r2526 55 55 </PropertyGroup> 56 56 <ItemGroup> 57 <Reference Include="alglib, Version=2.3.0.0, Culture=neutral, PublicKeyToken=3ac89a0351e689b6, processorArchitecture=MSIL"> 58 <SpecificVersion>False</SpecificVersion> 59 <HintPath>..\Dependencies\alglib.dll</HintPath> 57 <Reference Include="alglibnet2"> 58 <HintPath>..\Dependencies\alglibnet2.dll</HintPath> 60 59 </Reference> 61 60 <Reference Include="CommonLibrary, Version=0.9.3.10, Culture=neutral, PublicKeyToken=3ac89a0351e689b6, processorArchitecture=MSIL"> 62 61 <SpecificVersion>False</SpecificVersion> 63 62 <HintPath>..\Dependencies\CommonLibrary.dll</HintPath> 63 </Reference> 64 <Reference Include="Microsoft.Runtime.Hosting"> 65 <HintPath>..\Dependencies\Microsoft.Runtime.Hosting.dll</HintPath> 66 </Reference> 67 <Reference Include="Microsoft.Runtime.Hosting.Interop"> 68 <HintPath>..\Dependencies\Microsoft.Runtime.Hosting.Interop.dll</HintPath> 69 <EmbedInteropTypes>True</EmbedInteropTypes> 64 70 </Reference> 65 71 <Reference Include="System" /> … … 85 91 <Compile Include="Localisation.cs" /> 86 92 <Compile Include="NativeMethods\Kernel.cs" /> 87 <Compile Include="NativeMethods\MsCorEE.cs" />88 93 <Compile Include="NativeMethods\NetApi.cs" /> 89 94 <Compile Include="NativeMethods\NtDll.cs" /> -
trunk/eraser/Eraser.Util/Security.cs
r2516 r2526 23 23 using System.Collections.Generic; 24 24 using System.Text; 25 25 26 using System.ComponentModel; 26 27 using System.Security.Principal; 27 28 using System.Runtime.InteropServices; 29 28 30 using Microsoft.Win32.SafeHandles; 31 using Microsoft.Runtime.Hosting; 32 using Microsoft.Runtime.Hosting.Interop; 29 33 30 34 namespace Eraser.Util … … 88 92 public static bool VerifyStrongName(string assemblyPath) 89 93 { 90 bool wasVerified = false;91 return NativeMethods.StrongNameSignatureVerificationEx(assemblyPath, false,92 out wasVerified) && wasVerified;94 ICLRStrongName strongName = ClrMetaHost.CurrentRuntime.GetInterface<ICLRStrongName>( 95 new Guid(0xB79B0ACD, 0xF5CD, 0x409b, 0xB5, 0xA5, 0xA1, 0x62, 0x44, 0x61, 0x0B, 0x92)); 96 return strongName.StrongNameSignatureVerificationEx(assemblyPath, 1) != 0; 93 97 } 94 98 }
Note: See TracChangeset
for help on using the changeset viewer.
