Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the point of delay signing of an .NET assembly?

Tags:

c#

.net

I noticed that after I use AssemblyDelaySignAttribute to indicate that an assembly is in development and does not need to be signed now, I'll have to use sn -Vr foolib.dll to register for strong name verification to be turned off for this assembly.

What's the point of doing this circle? Why not just leave the assembly unsigned until it's fully done? Isn't that less bothering?

like image 538
smwikipedia Avatar asked Apr 21 '10 03:04

smwikipedia


People also ask

What is the need of delay signing the assemblies?

Delayed signing refers to a technique of partially signing assemblies while they are in the development phase. So, signing an assembly basically certifies that assembly by the manufacturer and prevents tampering and hi-jacking of that assembly.

How do you check if assembly is delay signed?

You can run sn -v "path to your assembly" . This will output xxx is a delay-signed or test-signed assembly if the assembly is delay signed. sn -v doesn't show me xxx is a delay-signed or test-signed assembly .

What is signing assembly in net?

.NET. Signing an assembly ensures that the consumer knows its origin and uniquely identifies the component. It makes the physical DLL file tamper-proof. This tutorial will step you through signing an assembly with a strong name key (SNK) in . NET.

How does assembly signing work?

Each strong-named assembly is digitally signed with a private key corresponding to its public key. This digital signature can be verified by using the public key that is stored in the manifest. You can also further sign an assembly with Authenticode on demand.


1 Answers

A couple reasons...

  1. Assemblies without a strong name cannot be added to the GAC
  2. Related to #1, assemblies not in the GAC do not benefit much from NGEN
  3. Strong named assemblies exhibit different behavior when it comes to assembly probing and loading with partial names.
  4. Assemblies without a strong name cannot be referenced by a strong named assembly

So in organizations where the signing process is tightly controlled, it helps to be able to fake it out for development.

like image 68
Josh Avatar answered Sep 19 '22 16:09

Josh