Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
What is Delay signing
What is Delay signing ?
✍: fyicenter.com
During development process you will need strong name keys to be exposed to developer which
is not a good practice from security aspect point of view.In such situations you can assign the key
later on and during development you an use delay signing
Following is process to delay sign an assembly:
ã First obtain your string name keys using SN.EXE.
ã Annotate the source code for the assembly with two custom attributes from
System.Reflection: AssemblyKeyFileAttribute, which passes the name of the file
containing the public key as a parameter to its constructor. AssemblyDelaySignAttribute,
which indicates that delay signing, is being used by passing true as a parameter to its
constructor. For example as shown below:
[Visual Basic]
<Assembly:AssemblyKeyFileAttribute("myKey.snk")>
<Assembly:AssemblyDelaySignAttribute(true)>
[C#]
[assembly:AssemblyKeyFileAttribute("myKey.snk")]
[assembly:AssemblyDelaySignAttribute(true)]
The compiler inserts the public key into the assembly manifest and reserves space in the PE file for
the full strong name signature. The real public key must be stored while the assembly is built so
that other assemblies that reference this assembly can obtain the key to store in their own assembly
reference.
¡Ì Because the assembly does not have a valid strong name signature, the verification of
that signature must be turned off. You can do this by using the ¨CVr option with the
Strong Name tool.The following example turns off verification for an assembly called
myAssembly.dll.
Sn ¨CVr myAssembly.dllr
¡Ì Just before shipping, you submit the assembly to your organization's signing authority
for the actual strong name signing using the ¨CR option with the Strong Name tool.
The following example signs an assembly called myAssembly.dll with a strong name
using the sgKey.snk key pair.
Sn -R myAssembly.dll sgKey.snk
2007-10-22, 5532👍, 0💬
Popular Posts:
What invokes a thread's run() method? After a thread is started, via its start() method of the Threa...
How To Insert Multiple Rows with a SELECT Statement? - MySQL FAQs - Managing Tables and Running Quer...
Jack developed a program by using a Map container to hold key/value pairs. He wanted to make a chang...
What are the types of variables x, y, y and u defined in the following code? #define Atype int* type...
.NET INTERVIEW QUESTIONS - What is Multi-tasking ? It’s a feature of modern operating systems with w...