diff options
author | Joel Hendrix <jhendrix@microsoft.com> | 2016-05-19 11:33:21 -0700 |
---|---|---|
committer | Joel Hendrix <jhendrix@microsoft.com> | 2016-05-19 11:33:21 -0700 |
commit | 5b784c2a3b1de97a8ee164d70207a9ba172d1f41 (patch) | |
tree | 25229db42f61c76b1cfb0024522701a1057e6a11 /src/sign.builds | |
parent | 2f456bb8ddcb0310a2499bf8d04391e632177481 (diff) | |
download | coreclr-5b784c2a3b1de97a8ee164d70207a9ba172d1f41.tar.gz coreclr-5b784c2a3b1de97a8ee164d70207a9ba172d1f41.tar.bz2 coreclr-5b784c2a3b1de97a8ee164d70207a9ba172d1f41.zip |
Add sign.builds projects to facilitate real signing in official builds.
New build project, sign.builds, is to be built post building of binaries
so that they can be real-signed in the official build.
Updated some project files with the correct strong name certificate.
Diffstat (limited to 'src/sign.builds')
-rw-r--r-- | src/sign.builds | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/src/sign.builds b/src/sign.builds new file mode 100644 index 0000000000..114880ae3b --- /dev/null +++ b/src/sign.builds @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="12.0" DefaultTargets="SignFiles" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + + <!-- must set the default before importing targets --> + <PropertyGroup> + <SignType Condition="'$(SignType)' == ''">test</SignType> + <StrongNameSig>Silverlight</StrongNameSig> + </PropertyGroup> + + <Import Project="..\dir.props"/> + <Import Project="..\dir.targets" /> + + <!-- OutDir is used by the MicroBuild signing target --> + <PropertyGroup> + <OutDir>$(BinDir)</OutDir> + </PropertyGroup> + + <UsingTask AssemblyFile="$(BuildToolsTaskDir)Microsoft.DotNet.Build.Tasks.dll" TaskName="ReadSigningRequired" /> + + <!-- apply the default signing certificates (defined in sign.targets) --> + <ItemDefinitionGroup> + <FilesToSign> + <Authenticode>$(AuthenticodeSig)</Authenticode> + <StrongName>$(StrongNameSig)</StrongName> + </FilesToSign> + </ItemDefinitionGroup> + + <!-- gather the list of binaries to sign with the default certificates --> + <ItemGroup> + <FilesToSign Include="$(BinDir)*.dll" Exclude="$(BinDir)*.ni.dll" /> + <FilesToSign Include="$(BinDir)*.exe" /> + </ItemGroup> + + <!-- + for some reason the signing task incorrectly attemps to strong-name sign + native images which causes the signing step to fail for obvious reasons. + --> + <ItemGroup> + <FilesToSign Include="$(BinDir)*.ni.dll"> + <StrongName>None</StrongName> + </FilesToSign> + </ItemGroup> + + <!-- populates item group FilesToSign with the list of files to sign --> + <Target Name="GetFilesToSignItems" BeforeTargets="SignFiles"> + <!-- read all of the marker files and populate the FilesToSign item group --> + <ItemGroup> + <SignMarkerFile Include="$(OutDir)**\*.requires_signing" /> + </ItemGroup> + <ReadSigningRequired MarkerFiles="@(SignMarkerFile)"> + <Output TaskParameter="SigningMetadata" ItemName="FilesToSign" /> + </ReadSigningRequired> + </Target> + + <!-- now that signing is done clean up any marker files --> + <Target Name="CleanUpMarkerFiles" AfterTargets="SignFiles"> + <!-- now that the files have been signed delete the marker files --> + <Delete Files="@(SignMarkerFile)" /> + </Target> + +</Project> |