Skip to content

Commit 3d6520a

Browse files
committed
Give the SDK and testing assemblies strong names
* The SDK key is stored outside the Git directory structure and must be provided by individual developers * The testing key is for development only and included in the repository (per-user keys would require each developer use a different set of [InternalsVisibleTo(...)] attributes)
1 parent 7ce7e2d commit 3d6520a

File tree

6 files changed

+38
-3
lines changed

6 files changed

+38
-3
lines changed

src/corelib/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,5 @@
2828
[assembly: AssemblyFileVersion("1.3.0.0")]
2929
[assembly: AssemblyInformationalVersion("1.3.0.0-dev")]
3030

31-
[assembly: InternalsVisibleTo("OpenStackNet.Testing.Integration")]
32-
[assembly: InternalsVisibleTo("OpenStackNet.Testing.Unit")]
33-
[assembly: InternalsVisibleTo("net.openstack.console")]
31+
[assembly: InternalsVisibleTo("OpenStackNet.Testing.Integration, PublicKey=002400000480000094000000060200000024000052534131000400000100010097de8570a3c78aa87191a604e55b95acf1a5075a317d622ab84287f8267b45755a46894b653c8b72d6d38815d2fa2dde8ba5d61c26ce8d5f398dc74ac3eb945fe1c3447753bdf4a3bfc1de3a489c4b5fb82f4cdc67681efffbd627ceca15531f638db991a702d7b8ad6825b51a151db543bad746a157b59ef325e0f44fe1bed1")]
32+
[assembly: InternalsVisibleTo("OpenStackNet.Testing.Unit, PublicKey=002400000480000094000000060200000024000052534131000400000100010097de8570a3c78aa87191a604e55b95acf1a5075a317d622ab84287f8267b45755a46894b653c8b72d6d38815d2fa2dde8ba5d61c26ce8d5f398dc74ac3eb945fe1c3447753bdf4a3bfc1de3a489c4b5fb82f4cdc67681efffbd627ceca15531f638db991a702d7b8ad6825b51a151db543bad746a157b59ef325e0f44fe1bed1")]

src/corelib/corelib.v3.5.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,12 @@
3434
<WarningLevel>4</WarningLevel>
3535
<DocumentationFile>bin\v3.5\Release\openstacknet.xml</DocumentationFile>
3636
</PropertyGroup>
37+
<PropertyGroup>
38+
<SignAssembly>true</SignAssembly>
39+
</PropertyGroup>
40+
<PropertyGroup>
41+
<AssemblyOriginatorKeyFile>..\..\..\keys\openstacknetsdk.snk</AssemblyOriginatorKeyFile>
42+
</PropertyGroup>
3743
<ItemGroup>
3844
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
3945
<SpecificVersion>False</SpecificVersion>
@@ -266,6 +272,9 @@
266272
<Compile Include="Providers\Rackspace\Validators\NamespaceDoc.cs" />
267273
</ItemGroup>
268274
<ItemGroup>
275+
<None Include="..\..\..\keys\openstacknetsdk.snk">
276+
<Link>openstacknetsdk.snk</Link>
277+
</None>
269278
<None Include="corelib.nuspec" />
270279
<None Include="packages.config" />
271280
</ItemGroup>

src/corelib/corelib.v4.0.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,12 @@
3333
<WarningLevel>4</WarningLevel>
3434
<DocumentationFile>bin\v4.0\Release\openstacknet.xml</DocumentationFile>
3535
</PropertyGroup>
36+
<PropertyGroup>
37+
<SignAssembly>true</SignAssembly>
38+
</PropertyGroup>
39+
<PropertyGroup>
40+
<AssemblyOriginatorKeyFile>..\..\..\keys\openstacknetsdk.snk</AssemblyOriginatorKeyFile>
41+
</PropertyGroup>
3642
<ItemGroup>
3743
<Reference Include="Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
3844
<SpecificVersion>False</SpecificVersion>
@@ -256,6 +262,9 @@
256262
<Compile Include="Providers\Rackspace\Validators\NamespaceDoc.cs" />
257263
</ItemGroup>
258264
<ItemGroup>
265+
<None Include="..\..\..\keys\openstacknetsdk.snk">
266+
<Link>openstacknetsdk.snk</Link>
267+
</None>
259268
<None Include="corelib.nuspec" />
260269
<None Include="packages.config" />
261270
</ItemGroup>

src/testing/SDKTestingKey.snk

596 Bytes
Binary file not shown.

src/testing/integration/integration.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
<ErrorReport>prompt</ErrorReport>
3333
<WarningLevel>4</WarningLevel>
3434
</PropertyGroup>
35+
<PropertyGroup>
36+
<SignAssembly>true</SignAssembly>
37+
</PropertyGroup>
38+
<PropertyGroup>
39+
<AssemblyOriginatorKeyFile>..\SDKTestingKey.snk</AssemblyOriginatorKeyFile>
40+
</PropertyGroup>
3541
<ItemGroup>
3642
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
3743
<Reference Include="Moq">
@@ -80,6 +86,9 @@
8086
</ProjectReference>
8187
</ItemGroup>
8288
<ItemGroup>
89+
<None Include="..\SDKTestingKey.snk">
90+
<Link>SDKTestingKey.snk</Link>
91+
</None>
8392
<None Include="App.config">
8493
<SubType>Designer</SubType>
8594
</None>

src/testing/unit/unit.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@
3232
<ErrorReport>prompt</ErrorReport>
3333
<WarningLevel>4</WarningLevel>
3434
</PropertyGroup>
35+
<PropertyGroup>
36+
<SignAssembly>true</SignAssembly>
37+
</PropertyGroup>
38+
<PropertyGroup>
39+
<AssemblyOriginatorKeyFile>..\SDKTestingKey.snk</AssemblyOriginatorKeyFile>
40+
</PropertyGroup>
3541
<ItemGroup>
3642
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL" />
3743
<Reference Include="Moq">
@@ -68,6 +74,9 @@
6874
<Compile Include="Providers\Rackspace\SerializationTests.cs" />
6975
</ItemGroup>
7076
<ItemGroup>
77+
<None Include="..\SDKTestingKey.snk">
78+
<Link>SDKTestingKey.snk</Link>
79+
</None>
7180
<None Include="packages.config" />
7281
</ItemGroup>
7382
<ItemGroup>

0 commit comments

Comments
 (0)