Skip to content

Strong-name sign assemblies - #66

Merged
madelson merged 2 commits into
madelson:strong-namefrom
ldennington:feature/strong-name-sign
Mar 22, 2020
Merged

madelson merged 2 commits into
madelson:strong-namefrom
ldennington:feature/strong-name-sign

Conversation

@ldennington

Copy link
Copy Markdown

Checking in private key files to strong-name sign all assemblies. For more information on the reasoning for strong-naming assemblies, see this article.

This submission is in response to Issue #65.

<NoWarn>1591</NoWarn>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>SampleCommand.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does SampleCommand need to be signed? I'd think that we could get away with just signing the non-test binaries.

<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<NoWarn>1591</NoWarn>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>MedallionShell.Tests.snk</AssemblyOriginatorKeyFile>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why does the tests project need to be signed?

<GenerateDocumentationFile>True</GenerateDocumentationFile>
<CodeAnalysisRuleSet>..\stylecop.analyzers.ruleset</CodeAnalysisRuleSet>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>MedallionShell.ProcessSignaler.snk</AssemblyOriginatorKeyFile>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary to use distinct snk files for each assembly? I feel like with MSFT assemblies I always see the same public key used (in binding redirects), which is kind of nice for knowing you've copied it correctly.

Comment thread MedallionShell/AssemblyAttributes.cs Outdated
using System.Runtime.CompilerServices;

[assembly: InternalsVisibleTo("MedallionShell.Tests")]
[assembly: InternalsVisibleTo("MedallionShell.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001008d4e301e51cf90722627e9a77bdce4bf73c8d4d33d7ebe1058050002627cc9a68388dfe94aa944e98a928b61dd160eb31aca338033729248ecec0955bf0e02e12d7cfb90534ed602e1ec78905ccd0062cdcc23b4ae2017a98849a72bb3c7e07e0bebcf31a03df79c01fca07486e16133b5d7699781b7910e5f353e2601f7cfa8")]

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. For my understanding, how would one come up with this public key value?
  2. In binding redirects, it uses a much shorter value for the key. Is that available here?

@madelson
madelson changed the base branch from master to strong-name March 22, 2020 01:06
@madelson
madelson merged commit 5eec049 into madelson:strong-name Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants