What is delay signing, DOT NET Programming

Delay signing

During the development process you  need strong keys name  to be exposed to the developer which is not a good practice from security aspect .In such situations you can assign the key later on and during development you use delay signing.

Following is the process to delay sign an assembly:

(1) First obtain string name keys using SN.EXE.

(2) Annotate the source code for  assembly with 2 custom attributes of System.Reflection: AssemblyKeyFileAttribute, that passes the name of the file having  public key as a parameter to its constructor. AssemblyDelaySignAttribute, which indicates that the delay signing, is being used by passing true as the  parameter to its constructor.

 

[C#]

           [assembly:AssemblyKeyFileAttribute("myKey.snk")]
           [assembly:AssemblyDelaySignAttribute(true)]

The compiler inserts the public key into assembly manifest and reserves space it in the PE file for the full strong name signature. The real public key should be stored while the assembly is built so that the other assemblies that reference this assembly can also obtain the key to store in their own assembly reference.

(3) Since the assembly does not have a valid strong name signature, the verification of that signature should  be turned off. You can do this by using -Vr option with the Strong Name tool.The example following  turns off verification for an assembly called myAssembly.dll.

Sn -Vr myAssembly.dll

(4) Just before shipping, you must submit the assembly to your organization's signing authority for the actual strong name signing using the -R option with the Strong Name tool. The following example signs an assembly known as myAssembly.dll with a strong name using sgKey.snk key pair.

Sn -R myAssembly.dll sgKey.snk

Posted Date: 9/18/2012 7:08:11 AM | Location : United States







Related Discussions:- What is delay signing, Assignment Help, Ask Question on What is delay signing, Get Answer, Expert's Help, What is delay signing Discussions

Write discussion on What is delay signing
Your posts are moderated
Related Questions
What is V model in testing? The V model map's the type of test to the stage of development in the project. Figure: - V Model 1) Unit Testing: The Starting fro

What is fill factor? The 'fill factor' option describes how full SQL Server will make each index page. When there is no free space to insert a new row on the index page, the SQ

Project Description: Looking for an internal-use, Manufacturing/ ERP Website developed for use at a Paper Mill. Modules/areas would include Customers, Scheduling, Sales Orders,

Normal 0 false false false EN-IN X-NONE X-NONE MicrosoftInternetExplorer4

Web Application and Web Service For this part of the assignment, you are to develop a web application and web service using technologies and techniques taught in this subject

The ASP.NET new feature supports are shown below :- Better Language Support 1) The New ADO.NET Concepts have been implemented. 2) The ASP.NET supports complete  language

I need Game development tutorials Project Description: We need video tutorials like lynda for game development using unity. You must have developed games before and need to s

What is an XMLReader Class? This is an abstract class available from the System.XML namespace. The XML reader works on a read-only stream browsing from one node to another in a

PhotoHandler add-on to display file names Project Description: I want a website with a photo gallery using PhotoHandler. I need the code added/ modified to display the image

What is serialization, how it works in .NET? Serialization is when you persist the state of an object to a storage medium so an exact copy can be re-created at a later stage. S