I see tool like SN which generates private/public key pair for signing an assembly. and using AL tool we can assign a strong name to an assembly
And we have also Sign tool which is used for signing the assembly (probably for using with certificates exclusively?).
What is the exact difference between the two?. Is it sign tool have to be used when working with certificates and can it we acheive it SN?. or are they totally different.?
Please help.
SignTool is a command-line tool that digitally signs files, verifies the signatures in files, and timestamps files. For information about why signing files is important, see Introduction to Code Signing.
A very important reason to sign an assembly is so you can be sure it is your assembly. Since the private key is yours, nobody else can sign an assembly with that same key. This means that when the public key of an assembly is one you know (you can retrieve this using the GetType(). Assembly.
To detect whether the assembly file is signed or not, right click on the file and click the 'Properties' from the context menu. If you see a 'Digital Signatures' tab in the properties window, that means, the file is signed by a digital signature (as shown below).
Signtool is to do code signing, which provides code integrity check and authentication of the publisher.
Sn is to do strong name. It's just for .NET assembly. It addresses the unique ID issue.
Both tools can make sure the files have not been tampered with but only code signing (signtool) can assure you who is the publisher of the files.
We can use SignTool.exe to sign and time stamp a file with given pfx, even though the file is a strong named dll.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With