From 8e7c2ca30b6e146cf7b30c56cc96778b3012e8d2 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Thu, 16 Jun 2016 14:27:29 -0700 Subject: [PATCH] Sign all assemblies with key --- .../AssemblyInfo.cs | 4 ---- .../project.json | 5 ++++- .../AssemblyInfo.cs | 5 ----- .../project.json | 3 +++ .../AssemblyInfo.cs | 5 ----- .../project.json | 3 +++ .../AssemblyInfo.cs | 5 ++--- .../project.json | 3 +++ .../AssemblyInfo.cs | 2 +- .../project.json | 3 +++ .../AssemblyInfo.cs | 2 +- .../project.json | 3 +++ .../project.json | 3 +++ .../project.json | 3 +++ .../AssemblyInfo.cs | 5 ----- src/Microsoft.PowerShell.Security/project.json | 3 +++ .../AssemblyInfo.cs | 17 +---------------- src/System.Management.Automation/project.json | 3 +++ src/System.Security.SecureString/key.snk | Bin 0 -> 160 bytes src/System.Security.SecureString/project.json | 3 +++ test/csharp/project.json | 6 ++++++ 21 files changed, 45 insertions(+), 41 deletions(-) create mode 100644 src/System.Security.SecureString/key.snk diff --git a/src/Microsoft.PowerShell.Commands.Diagnostics/AssemblyInfo.cs b/src/Microsoft.PowerShell.Commands.Diagnostics/AssemblyInfo.cs index 5ef0bbe750..edd96e49d3 100644 --- a/src/Microsoft.PowerShell.Commands.Diagnostics/AssemblyInfo.cs +++ b/src/Microsoft.PowerShell.Commands.Diagnostics/AssemblyInfo.cs @@ -7,7 +7,3 @@ using System.Resources; [assembly:AssemblyCulture("")] [assembly:NeutralResourcesLanguage("en-US")] -#if !CORECLR -[assembly:AssemblyKeyFileAttribute(@"..\signing\visualstudiopublic.snk")] -[assembly:AssemblyDelaySignAttribute(true)] -#endif diff --git a/src/Microsoft.PowerShell.Commands.Diagnostics/project.json b/src/Microsoft.PowerShell.Commands.Diagnostics/project.json index 54f82ee5c5..edef1766b9 100644 --- a/src/Microsoft.PowerShell.Commands.Diagnostics/project.json +++ b/src/Microsoft.PowerShell.Commands.Diagnostics/project.json @@ -6,6 +6,9 @@ "sevoroby" ], "buildOptions": { + "keyFile": "../signing/visualstudiopublic.snk", + "delaySign": true, + "publicSign": false, "warningsAsErrors": true }, "dependencies": { @@ -39,4 +42,4 @@ "net451": { } } -} \ No newline at end of file +} diff --git a/src/Microsoft.PowerShell.Commands.Management/AssemblyInfo.cs b/src/Microsoft.PowerShell.Commands.Management/AssemblyInfo.cs index 5ef0bbe750..8be3229350 100644 --- a/src/Microsoft.PowerShell.Commands.Management/AssemblyInfo.cs +++ b/src/Microsoft.PowerShell.Commands.Management/AssemblyInfo.cs @@ -6,8 +6,3 @@ using System.Resources; [assembly:AssemblyCulture("")] [assembly:NeutralResourcesLanguage("en-US")] - -#if !CORECLR -[assembly:AssemblyKeyFileAttribute(@"..\signing\visualstudiopublic.snk")] -[assembly:AssemblyDelaySignAttribute(true)] -#endif diff --git a/src/Microsoft.PowerShell.Commands.Management/project.json b/src/Microsoft.PowerShell.Commands.Management/project.json index 32935f639c..6f15b78bc4 100644 --- a/src/Microsoft.PowerShell.Commands.Management/project.json +++ b/src/Microsoft.PowerShell.Commands.Management/project.json @@ -4,6 +4,9 @@ "authors": [ "garretts", "andschwa" ], "buildOptions": { + "keyFile": "../signing/visualstudiopublic.snk", + "delaySign": true, + "publicSign": false, "warningsAsErrors": true, "allowUnsafe": true }, diff --git a/src/Microsoft.PowerShell.Commands.Utility/AssemblyInfo.cs b/src/Microsoft.PowerShell.Commands.Utility/AssemblyInfo.cs index 5ef0bbe750..8be3229350 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/AssemblyInfo.cs +++ b/src/Microsoft.PowerShell.Commands.Utility/AssemblyInfo.cs @@ -6,8 +6,3 @@ using System.Resources; [assembly:AssemblyCulture("")] [assembly:NeutralResourcesLanguage("en-US")] - -#if !CORECLR -[assembly:AssemblyKeyFileAttribute(@"..\signing\visualstudiopublic.snk")] -[assembly:AssemblyDelaySignAttribute(true)] -#endif diff --git a/src/Microsoft.PowerShell.Commands.Utility/project.json b/src/Microsoft.PowerShell.Commands.Utility/project.json index 6f0187bcac..057fd1ef7a 100644 --- a/src/Microsoft.PowerShell.Commands.Utility/project.json +++ b/src/Microsoft.PowerShell.Commands.Utility/project.json @@ -4,6 +4,9 @@ "authors": [ "garretts", "andschwa" ], "buildOptions": { + "keyFile": "../signing/visualstudiopublic.snk", + "delaySign": true, + "publicSign": false, "warningsAsErrors": true, "allowUnsafe": true }, diff --git a/src/Microsoft.PowerShell.ConsoleHost/AssemblyInfo.cs b/src/Microsoft.PowerShell.ConsoleHost/AssemblyInfo.cs index fad3142bb2..a3b73ab202 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/AssemblyInfo.cs +++ b/src/Microsoft.PowerShell.ConsoleHost/AssemblyInfo.cs @@ -7,10 +7,11 @@ using System.Runtime.ConstrainedExecution; using System.Security.Permissions; #endif +[assembly:InternalsVisibleTo("powershell-tests,PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] + #if CORECLR [assembly:AssemblyCulture("")] [assembly:NeutralResourcesLanguage("en-US")] -[assembly:InternalsVisibleTo("powershell-tests")] #else [assembly:AssemblyConfiguration("")] [assembly:AssemblyInformationalVersionAttribute (@"10.0.10011.16384")] @@ -20,8 +21,6 @@ using System.Security.Permissions; [assembly:System.Runtime.Versioning.TargetFrameworkAttribute(".NETFramework,Version=v4.5")] [assembly:System.Reflection.AssemblyFileVersion("10.0.10011.16384")] -[assembly:AssemblyKeyFileAttribute(@"..\signing\visualstudiopublic.snk")] -[assembly:System.Reflection.AssemblyDelaySign(true)] #endif [assembly:System.Runtime.InteropServices.ComVisible(false)] diff --git a/src/Microsoft.PowerShell.ConsoleHost/project.json b/src/Microsoft.PowerShell.ConsoleHost/project.json index a64e63859c..90d81c76a2 100644 --- a/src/Microsoft.PowerShell.ConsoleHost/project.json +++ b/src/Microsoft.PowerShell.ConsoleHost/project.json @@ -5,6 +5,9 @@ "authors": [ "sevoroby", "andschwa" ], "buildOptions": { + "keyFile": "../signing/visualstudiopublic.snk", + "delaySign": true, + "publicSign": false, "warningsAsErrors": true, "allowUnsafe": true, "copyToOutput": { diff --git a/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/AssemblyInfo.cs b/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/AssemblyInfo.cs index ddc37ef73c..5b6784900c 100644 --- a/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/AssemblyInfo.cs +++ b/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/AssemblyInfo.cs @@ -1,5 +1,5 @@ using System.Runtime.CompilerServices; using System.Reflection; -[assembly:InternalsVisibleTo("System.Management.Automation")] +[assembly:InternalsVisibleTo("System.Management.Automation,PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] [assembly:AssemblyFileVersionAttribute("1.0.0.0")] [assembly:AssemblyVersion("1.0.0.0")] diff --git a/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/project.json b/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/project.json index 44087e8eee..e81fc90f25 100644 --- a/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/project.json +++ b/src/Microsoft.PowerShell.CoreCLR.AssemblyLoadContext/project.json @@ -4,6 +4,9 @@ "authors": [ "andschwa" ], "buildOptions": { + "keyFile": "../signing/visualstudiopublic.snk", + "delaySign": true, + "publicSign": false, "warningsAsErrors": true }, diff --git a/src/Microsoft.PowerShell.CoreCLR.Eventing/AssemblyInfo.cs b/src/Microsoft.PowerShell.CoreCLR.Eventing/AssemblyInfo.cs index ddc37ef73c..5b6784900c 100644 --- a/src/Microsoft.PowerShell.CoreCLR.Eventing/AssemblyInfo.cs +++ b/src/Microsoft.PowerShell.CoreCLR.Eventing/AssemblyInfo.cs @@ -1,5 +1,5 @@ using System.Runtime.CompilerServices; using System.Reflection; -[assembly:InternalsVisibleTo("System.Management.Automation")] +[assembly:InternalsVisibleTo("System.Management.Automation,PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] [assembly:AssemblyFileVersionAttribute("1.0.0.0")] [assembly:AssemblyVersion("1.0.0.0")] diff --git a/src/Microsoft.PowerShell.CoreCLR.Eventing/project.json b/src/Microsoft.PowerShell.CoreCLR.Eventing/project.json index 9b43cd2574..21fdcbb1e4 100644 --- a/src/Microsoft.PowerShell.CoreCLR.Eventing/project.json +++ b/src/Microsoft.PowerShell.CoreCLR.Eventing/project.json @@ -4,6 +4,9 @@ "authors": [ "sevoroby" ], "buildOptions": { + "keyFile": "../signing/visualstudiopublic.snk", + "delaySign": true, + "publicSign": false, "warningsAsErrors": true, "allowUnsafe": true }, diff --git a/src/Microsoft.PowerShell.LocalAccounts/project.json b/src/Microsoft.PowerShell.LocalAccounts/project.json index bc9472d328..d9498b4bb2 100644 --- a/src/Microsoft.PowerShell.LocalAccounts/project.json +++ b/src/Microsoft.PowerShell.LocalAccounts/project.json @@ -4,6 +4,9 @@ "authors": [ "OPS" ], "buildOptions": { + "keyFile": "../signing/visualstudiopublic.snk", + "delaySign": true, + "publicSign": false, "warningsAsErrors": true }, diff --git a/src/Microsoft.PowerShell.PSReadLine/project.json b/src/Microsoft.PowerShell.PSReadLine/project.json index 7f9bce5431..83acdaa7bc 100644 --- a/src/Microsoft.PowerShell.PSReadLine/project.json +++ b/src/Microsoft.PowerShell.PSReadLine/project.json @@ -4,6 +4,9 @@ "authors": [ "andschwa" ], "buildOptions": { + "keyFile": "../signing/visualstudiopublic.snk", + "delaySign": true, + "publicSign": false, "warningsAsErrors": true }, diff --git a/src/Microsoft.PowerShell.Security/AssemblyInfo.cs b/src/Microsoft.PowerShell.Security/AssemblyInfo.cs index 5ef0bbe750..8be3229350 100644 --- a/src/Microsoft.PowerShell.Security/AssemblyInfo.cs +++ b/src/Microsoft.PowerShell.Security/AssemblyInfo.cs @@ -6,8 +6,3 @@ using System.Resources; [assembly:AssemblyCulture("")] [assembly:NeutralResourcesLanguage("en-US")] - -#if !CORECLR -[assembly:AssemblyKeyFileAttribute(@"..\signing\visualstudiopublic.snk")] -[assembly:AssemblyDelaySignAttribute(true)] -#endif diff --git a/src/Microsoft.PowerShell.Security/project.json b/src/Microsoft.PowerShell.Security/project.json index 2e8c11b492..8c5cac81d7 100644 --- a/src/Microsoft.PowerShell.Security/project.json +++ b/src/Microsoft.PowerShell.Security/project.json @@ -4,6 +4,9 @@ "authors": [ "garretts", "andschwa" ], "buildOptions": { + "keyFile": "../signing/visualstudiopublic.snk", + "delaySign": true, + "publicSign": false, "warningsAsErrors": true, "allowUnsafe": true }, diff --git a/src/System.Management.Automation/AssemblyInfo.cs b/src/System.Management.Automation/AssemblyInfo.cs index cfe4a9105c..937bfa8ae7 100644 --- a/src/System.Management.Automation/AssemblyInfo.cs +++ b/src/System.Management.Automation/AssemblyInfo.cs @@ -8,16 +8,7 @@ using System.Resources; [assembly:AssemblyCulture("")] [assembly:NeutralResourcesLanguage("en-US")] -#if CORECLR - -[assembly:InternalsVisibleTo("Microsoft.PowerShell.Commands.Management")] -[assembly:InternalsVisibleTo("Microsoft.PowerShell.Commands.Utility")] -[assembly:InternalsVisibleTo("Microsoft.PowerShell.Security")] -[assembly:InternalsVisibleTo("Microsoft.PowerShell.CoreCLR.AssemblyLoadContext")] -[assembly:InternalsVisibleTo("Microsoft.PowerShell.ConsoleHost")] -[assembly:InternalsVisibleTo("powershell-tests")] - -#else +[assembly:InternalsVisibleTo("powershell-tests,PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] [assembly: InternalsVisibleTo("Microsoft.Test.Management.Automation.GPowershell.Analyzers,PublicKey=00240000048000009400000006020000002400005253413100040000010001003f8c902c8fe7ac83af7401b14c1bd103973b26dfafb2b77eda478a2539b979b56ce47f36336741b4ec52bbc51fecd51ba23810cec47070f3e29a2261a2d1d08e4b2b4b457beaa91460055f78cc89f21cd028377af0cc5e6c04699b6856a1e49d5fad3ef16d3c3d6010f40df0a7d6cc2ee11744b5cfb42e0f19a52b8a29dc31b0")] @@ -35,11 +26,6 @@ using System.Resources; [assembly: InternalsVisibleTo(@"Microsoft.PowerShell.Editor"+@",PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] [assembly: InternalsVisibleTo(@"powershell_ise"+@",PublicKey=0024000004800000940000000602000000240000525341310004000001000100b5fc90e7027f67871e773a8fde8938c81dd402ba65b9201d60593e96c492651e889cc13f1415ebb53fac1131ae0bd333c5ee6021672d9718ea31a8aebd0da0072f25d87dba6fc90ffd598ed4da35e44c398c454307e8e33b8426143daec9f596836f97c8f74750e5975c64e2189f45def46b2a2b1247adc3652bf5c308055da9")] -[assembly:AssemblyKeyFileAttribute(@"..\signing\visualstudiopublic.snk")] -[assembly:AssemblyDelaySignAttribute(true)] - -#endif - namespace System.Management.Automation { internal class NTVerpVars @@ -51,4 +37,3 @@ namespace System.Management.Automation internal const int PACKAGEBUILD_QFE = 814; } } - diff --git a/src/System.Management.Automation/project.json b/src/System.Management.Automation/project.json index c5a4697bf0..be1c2b0d9a 100644 --- a/src/System.Management.Automation/project.json +++ b/src/System.Management.Automation/project.json @@ -4,6 +4,9 @@ "authors": [ "garretts", "andschwa" ], "buildOptions": { + "keyFile": "../signing/visualstudiopublic.snk", + "delaySign": true, + "publicSign": false, "warningsAsErrors": true, "allowUnsafe": true }, diff --git a/src/System.Security.SecureString/key.snk b/src/System.Security.SecureString/key.snk new file mode 100644 index 0000000000000000000000000000000000000000..110b59c7b0d27388353dcf4116f721595f473e58 GIT binary patch literal 160 zcmV;R0AK$ABme*efB*oL000060ssI2Bme+XQ$aBR1ONa500968(fU`!uG#RTE`+KN zuKf+^=>2N!kB9pMc5H)8nUWr|JLj6&)!f0|n$k8CAp(#KayILlN=pn$R@96PlTucm;!K;}lU1BV%Wh@=~);)AxZ!P8VeqOH+#FjlK9EuV{ OWf&lBz>_phTGEsG5JRQ_ literal 0 HcmV?d00001 diff --git a/src/System.Security.SecureString/project.json b/src/System.Security.SecureString/project.json index c27bcc313d..aa32204f5b 100644 --- a/src/System.Security.SecureString/project.json +++ b/src/System.Security.SecureString/project.json @@ -5,6 +5,9 @@ "authors": [ "garretts" ], "buildOptions": { + "keyFile": "key.snk", + "delaySign": true, + "publicSign": false, "warningsAsErrors": true, "allowUnsafe": true }, diff --git a/test/csharp/project.json b/test/csharp/project.json index 6c4754c98a..a8d99f79e9 100644 --- a/test/csharp/project.json +++ b/test/csharp/project.json @@ -4,6 +4,12 @@ "description": "PowerShell On Linux xUnit Tests", "authors": [ "andschwa" ], + "buildOptions": { + "keyFile": "../../src/signing/visualstudiopublic.snk", + "delaySign": true, + "publicSign": false + }, + "dependencies": { "powershell": "1.0.0-*" },