You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by Markus Weimer <ma...@weimo.de> on 2015/07/08 18:24:37 UTC

DLL Signing

> If I understand correctly you signed the DLL with the OLD key, but 
> declared the ones signed with the NEW key as friends. How can this
> work?

Julia and I spoke offline and as part of #283. The current assumption is
that older builds are in fact cached in the Global Assembly Cache (GAC).
When the tests load the DLL to be tested, they in fact load it from the
GAC, testing an older version. This line of thought leads to the
troubling question of how we can be sure to test the right code when we
run unit tests.

Regarding the key issue:

The .NET binaries for the 0.11 release have been signed with the private
key available in our public source repository. That means that the
signature on those DLLs can't be trusted as a proof of origin.

Users of this release who need trusted signatures are, for now, probably
best off relying on the source releases and building the DLLs themselves.

Going forward, I filled [REEF-457] to track progress towards more
trustworthy signatures on our convenience binaries.

Also, is there a way for us to edit the description of the NuGets on
nuget.org to inform users of the nature of the signatures?

Markus

RE: DLL Signing

Posted by "Julia Wang (QIUHE)" <Qi...@microsoft.com>.
More study shows the following:

The checking happens at build time rather than runtime -we are safe
The key must match if the internal code is used from the friend module

We added InternalsVisibleTo in the AssemblyInfo but not really makes calls in the test code. After explicitly added some internal code in one module and use it in the corresponding test module, the key match is required consistently.

Now there is a new issue:
In release build, all the dlls are signed, therefor we are required to put public key in InternalsVisibleTo. While in debug build, dlls are not signed, when InternalsVisibleTo specifies a public key, the corresponding dll must be signed and match this key. This error happens after adding an internal code usage in testing. 

One way to solve it is to sign dlls in debug build as well. 

Thanks,
Julia

-----Original Message-----
From: Markus Weimer [mailto:markus@weimo.de] 
Sent: Wednesday, July 8, 2015 9:25 AM
To: dev@reef.incubator.apache.org
Subject: DLL Signing

> If I understand correctly you signed the DLL with the OLD key, but 
> declared the ones signed with the NEW key as friends. How can this 
> work?

Julia and I spoke offline and as part of #283. The current assumption is that older builds are in fact cached in the Global Assembly Cache (GAC).
When the tests load the DLL to be tested, they in fact load it from the GAC, testing an older version. This line of thought leads to the troubling question of how we can be sure to test the right code when we run unit tests.

Regarding the key issue:

The .NET binaries for the 0.11 release have been signed with the private key available in our public source repository. That means that the signature on those DLLs can't be trusted as a proof of origin.

Users of this release who need trusted signatures are, for now, probably best off relying on the source releases and building the DLLs themselves.

Going forward, I filled [REEF-457] to track progress towards more trustworthy signatures on our convenience binaries.

Also, is there a way for us to edit the description of the NuGets on nuget.org to inform users of the nature of the signatures?

Markus