jimmyconti / nettopologysuite

Automatically exported from code.google.com/p/nettopologysuite
0 stars 0 forks source link

Sign .NET assemblies #174

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Currently NTS and GeoAPI assemblies are not signed, this makes their use 
impossible in some situations (e.g. referencing from other signed assemblies, 
putting into GAC). 

Original issue reported on code.google.com by Gennadiy.Donchyts on 28 Jan 2014 at 9:46

GoogleCodeExporter commented 9 years ago
Have just done an SVN checkup of all sources. Should be easy to add a 
self-signed certificate (which is enough). Afterwards, I'll see if/how I can 
check that change back in.

Original comment by j.pesch...@gmail.com on 10 Feb 2014 at 9:35

GoogleCodeExporter commented 9 years ago
It seems there already is a key file named 
nettopologysuite\NetTopologySuite\nts.snk that is also referenced from 
nettopologysuite\NetTopologySuite\NetTopologySuite.csproj already (Properties, 
Signing tab, "Sign the assembly"), but with the actual "Sign the assembly" 
checkbox turned off. If these are turned on for all relevant assemblies, they 
should be strongly named. Will try to do this in local solution. Again, after 
that I will try to check in the change.

Original comment by j.pesch...@gmail.com on 10 Feb 2014 at 9:55

GoogleCodeExporter commented 9 years ago
You will need to post a patch file, as you don't have commit rights.

Original comment by felix.ob...@netcologne.de on 10 Feb 2014 at 10:05

GoogleCodeExporter commented 9 years ago
Tried doing an SVN Commit, but got a "Server sent unexpected return value (405 
Method Not Allowed) in response to". How do I submit changeset with unit test 
to check whether assemblies are strongly named plus changes to project files to 
turn relevant signing checkbox on...?

Original comment by j.pesch...@gmail.com on 10 Feb 2014 at 11:19

GoogleCodeExporter commented 9 years ago
Sorry, here should be a patch file containing my changes. Hope this helps.

Original comment by j.pesch...@gmail.com on 10 Feb 2014 at 11:23

Attachments:

GoogleCodeExporter commented 9 years ago
Also added a patch to 
https://code.google.com/p/nettopologysuite/issues/detail?id=172 of case that 
failed for us and still fails on current code base...

Original comment by j.pesch...@gmail.com on 10 Feb 2014 at 1:09

GoogleCodeExporter commented 9 years ago
looks ok to me.
I've found two minor errors:
1. sql2008 project doesn't build until you delete nts.key file reference (a 
project reference to a missing file)
2. geoapi signing is disabled
3. we need to sign also proj.net?

Original comment by diegogu...@gmail.com on 12 Feb 2014 at 8:13

GoogleCodeExporter commented 9 years ago
sorry, you shound delete nts file for all IO projects.

Original comment by diegogu...@gmail.com on 12 Feb 2014 at 8:18

GoogleCodeExporter commented 9 years ago
Here my fixed patch, someone can make a review? So if all is ok I can commit 
this.
For SL/WP7 and other builds, I wanna leave projects as is, and maybe fix when 
we move to PCL (I hope soon).

Thanks j.peschier for the patch :)

Original comment by diegogu...@gmail.com on 12 Feb 2014 at 8:34

Attachments:

GoogleCodeExporter commented 9 years ago
My pleasure.

I think it would be best to have all "regular" .NET Framework version 
assemblies signed (if Proj.Net were not signed, it would still make it 
impossible to use that as a reference in other signed projects). The proposed 
exception for SL/WP/other builds seems a valid one. The (future) PCL versions 
might better be signed though, just to be sure.

Also, the most important part of my patch might be the unit tests (ensuring 
that all assemblies are actually signed, so this is never missed in future 
again). The exact settings per project (which key file to use, whether to use 
on for all assemblies in same project or individual key files per assemby, 
etc.) is just irrelevant implementation.

I leave the details of that up to you guys, as long as all assemblies are 
strongly named. ;-)

Original comment by j.pesch...@gmail.com on 13 Feb 2014 at 7:16

GoogleCodeExporter commented 9 years ago
so the patch (expept proj.net project) looks valid to you?

Original comment by diegogu...@gmail.com on 13 Feb 2014 at 7:56

GoogleCodeExporter commented 9 years ago
> so the patch (expept proj.net project) looks valid to you?
yes

Original comment by felix.ob...@netcologne.de on 13 Feb 2014 at 8:24

GoogleCodeExporter commented 9 years ago
ok so I plan to commit soon

Original comment by diegogu...@gmail.com on 13 Feb 2014 at 8:26

GoogleCodeExporter commented 9 years ago
added with revision r1156 
https://code.google.com/p/nettopologysuite/source/detail?r=1156

Original comment by diegogu...@gmail.com on 13 Feb 2014 at 8:42

GoogleCodeExporter commented 9 years ago
looks all ok :)

Original comment by diegogu...@gmail.com on 13 Feb 2014 at 3:51