Skip to content

Commit de942bd

Browse files
committed
Checking in keys scary but:
Do not rely on strong names for security. They provide a unique identity only. (https://msdn.microsoft.com/en-us/library/wd40t7ad.aspx) Firstly, we would recommend that these open source projects check-in their private key (https://github.com/dotnet/corefx/wiki/Strong%20Naming) And this twitter conversation: https://twitter.com/Mpdreamz/status/534971537271816192 This removes our complicated prebuild that creates keys if not present. We can not simply call sn.exe over our compiled dlls because our dlls also depend on eachother which means msbuild needs to do the signing.
1 parent e40c144 commit de942bd

File tree

8 files changed

+1
-25
lines changed

8 files changed

+1
-25
lines changed

.gitignore

+1-5
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,9 @@ _ReSharper*/
3434
_NCrunch*/
3535
[Tt]est[Rr]esult*
3636

37-
keypair.snk
38-
private.snk
39-
*.snk
40-
build/keys/private.snk
41-
build/keys/keypair.snk
4237
build/*
4338
!build/tools
39+
!build/keys
4440
build/tools/*
4541
!build/tools/sn
4642
!build/tools/sn/*

build/keys/keypair.snk

596 Bytes
Binary file not shown.

build/keys/public.snk

160 Bytes
Binary file not shown.

src/Connections/Elasticsearch.Net.Connection.HttpClient/Elasticsearch.Net.Connection.HttpClient.csproj

-4
Original file line numberDiff line numberDiff line change
@@ -63,10 +63,6 @@
6363
</ProjectReference>
6464
</ItemGroup>
6565
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
66-
<PropertyGroup>
67-
<PreBuildEvent Condition=" '$(OS)' != 'Unix' ">IF NOT EXIST "$(SolutionDir)..\build\keys\keypair.snk" (CD "$(SolutionDir).." &amp;&amp; "build.bat" CreateKeysIfAbsent &amp;&amp; CD %25~dp0)
68-
</PreBuildEvent>
69-
</PropertyGroup>
7066
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
7167
Other similar extension points exist, see Microsoft.Common.targets.
7268
<Target Name="BeforeBuild">

src/Connections/Elasticsearch.Net.Connection.Thrift/Elasticsearch.Net.Connection.Thrift.csproj

-4
Original file line numberDiff line numberDiff line change
@@ -132,10 +132,6 @@
132132
</ProjectReference>
133133
</ItemGroup>
134134
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
135-
<PropertyGroup>
136-
<PreBuildEvent Condition=" '$(OS)' != 'Unix' ">IF NOT EXIST "$(SolutionDir)..\build\keys\keypair.snk" (CD "$(SolutionDir).." &amp;&amp; "build.bat" CreateKeysIfAbsent &amp;&amp; CD %25~dp0)
137-
</PreBuildEvent>
138-
</PropertyGroup>
139135
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
140136
Other similar extension points exist, see Microsoft.Common.targets.
141137
<Target Name="BeforeBuild">

src/Elasticsearch.Net/Elasticsearch.Net.csproj

-4
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,6 @@
135135
<None Include="paket.references" />
136136
</ItemGroup>
137137
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
138-
<PropertyGroup>
139-
<PreBuildEvent Condition=" '$(OS)' != 'Unix' ">IF NOT EXIST "$(SolutionDir)..\build\keys\keypair.snk" (CD "$(SolutionDir).." &amp;&amp; "build.bat" CreateKeysIfAbsent &amp;&amp; CD %25~dp0)
140-
</PreBuildEvent>
141-
</PropertyGroup>
142138
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
143139
Other similar extension points exist, see Microsoft.Common.targets.
144140
<Target Name="BeforeBuild">

src/Nest/Nest.csproj

-4
Original file line numberDiff line numberDiff line change
@@ -1067,10 +1067,6 @@
10671067
</ItemGroup>
10681068
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
10691069
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
1070-
<PropertyGroup Condition=" '$(OS)' != 'Unix' ">
1071-
<!--<PreBuildEvent>IF NOT EXIST "$(SolutionDir)..\build\keys\keypair.snk" (CD "$(SolutionDir).." &amp;&amp; "build.bat" CreateKeysIfAbsent &amp;&amp; CD %25~dp0)
1072-
</PreBuildEvent>-->
1073-
</PropertyGroup>
10741070
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
10751071
Other similar extension points exist, see Microsoft.Common.targets.
10761072
<Target Name="BeforeBuild">

src/Serialization/Elasticsearch.Net.JsonNet/Elasticsearch.Net.JsonNet.csproj

-4
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,6 @@
6464
</None>
6565
</ItemGroup>
6666
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
67-
<PropertyGroup>
68-
<PreBuildEvent Condition=" '$(OS)' != 'Unix' ">IF NOT EXIST "$(SolutionDir)..\build\keys\keypair.snk" (CD "$(SolutionDir).." &amp;&amp; "build.bat" CreateKeysIfAbsent &amp;&amp; CD %25~dp0)
69-
</PreBuildEvent>
70-
</PropertyGroup>
7167
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
7268
Other similar extension points exist, see Microsoft.Common.targets.
7369
<Target Name="BeforeBuild">

0 commit comments

Comments
 (0)