PC Review


Reply
Thread Tools Rate Thread

Code Signing in Visual Studio

 
 
Joe Monnin
Guest
Posts: n/a
 
      28th May 2010
I'm very puzzled about the code signing system in place in Visual Studio. I
can sign ClickOnce deployments with a certificate from the certifcate store.
Why can I not do the same thing when signing an assembly? For that, I need
to have a .pfx or .snk file. My company does not want to give the Verisign
certificate password to the development team, and rightly so since they could
then take that .pfx home an start singing any sort of trash they wanted with
the company certificate. So instead, they have installed the certificate
with the private key in the certificate store and disabled the ability to
export the private key. The only way to sign code is then to use
signtool.exe. Code signing in Visual Studio is not possible. Why aren't the
code signing mechanisms for ClickOnce and assemblies the same? It seems like
I must be missing something here, but I can't imagine what it could be.
 
Reply With Quote
 
 
 
 
John Vottero
Guest
Posts: n/a
 
      28th May 2010
"Joe Monnin" <(E-Mail Removed)> wrote in message
news:5436EBC4-70BA-413E-9266-(E-Mail Removed)...
> I'm very puzzled about the code signing system in place in Visual Studio.
> I
> can sign ClickOnce deployments with a certificate from the certifcate
> store.
> Why can I not do the same thing when signing an assembly? For that, I
> need
> to have a .pfx or .snk file. My company does not want to give the
> Verisign
> certificate password to the development team, and rightly so since they
> could
> then take that .pfx home an start singing any sort of trash they wanted
> with
> the company certificate. So instead, they have installed the certificate
> with the private key in the certificate store and disabled the ability to
> export the private key. The only way to sign code is then to use
> signtool.exe. Code signing in Visual Studio is not possible. Why aren't
> the
> code signing mechanisms for ClickOnce and assemblies the same? It seems
> like
> I must be missing something here, but I can't imagine what it could be.


I have the same questions. It doesn't make sense to me. Further, I don't
think you can digitally sign an assembly in Visual Studio, not even in 2010.
The assembly signing is for a strong name, not a public code signing
certificate. Still, you don't want to be handing out your strong name key
either.

I have found that you can strong name sign with a key from the certificate
store by editing your *.csproj file and adding:

<KeyContainerName>YourKeyName</KeyContainerName>

Add this right after the <AssemblyName>. <SignAssembly> should be left as
false.

You still have to use signtool.exe (or Set-AuthenticodeSignature) to sign
the assembly with your Verisign certificate.




 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to take an IE rendered screenshot of a website with visual studio .net 2002 or visual stuido .net 2003? I can't install visual studio .net 2005 on this computer. Daniel Microsoft Dot NET 4 17th May 2007 07:56 PM
How to take an IE rendered screenshot of a website with visual studio .net 2002 or visual stuido .net 2003? I can't install visual studio .net 2005 on this computer. Daniel Microsoft Dot NET Framework 1 14th May 2007 08:05 PM
How to take an IE rendered screenshot of a website with visual studio .net 2002 or visual stuido .net 2003? I can't install visual studio .net 2005 on this computer. Daniel Microsoft C# .NET 0 14th May 2007 07:45 PM
.net studio (javascript) : dynode code not visible in visual studio d d Microsoft Dot NET 0 28th Sep 2006 09:58 PM
Visual Studio Extensions Signing Bug Mark Harris Microsoft C# .NET 1 21st Jul 2006 03:53 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:24 AM.