Ask a Question related to ASP.NET Security, Design and Development.
-
localhost #1
PKCS#12 File to Sign Assemblies?
I have an individual PKCS#12 file. Can I use it to sign assemblies
instead of using "sn -k" ?
Thanks.
localhost Guest
-
#39867 [NEW]: Openssl: add wrapper functions for PKCS#12 handling
From: delling at silpion dot de Operating system: all PHP version: 5.2.0 PHP Bug Type: Feature/Change Request Bug... -
Sign In/Sign Out like macromedia page
I would like to add a sign in link that after you are signed in changes to sign out like on the top of the macromedia site. If anyone can help with... -
Are MS Assemblies in the GAC?
I want to create strongly signed support assemblies so they can be shared by different ASP.NET web apps. This requires that they be installed into... -
minus sign proportion to + sign in bold
Does anyone know how to make a minus sign that is proportional to a plus sign (+) in bold in Freehand? -
PKCS #12 (.pfx) Export Greyed Out
I am trying to export a certificate from Microsoft Certificate Server to be used for setting up TLS tunnels for use with wireless. I have figured... -
Yan-Hong Huang[MSFT] #2
RE: PKCS#12 File to Sign Assemblies?
Hi,
sn.exe uses RSA public/private keypairs specified as either a snk file
(which is simply a CryptoAPI PRIVATEKEYBLOB format) or you can also specify
a CryptoAPI keycontainer name in your source code (or in the VS.NET
AssemblyInfo.cs file) viz:
[assembly:AssemblyKeyNameAttribute("anyCSPkeycontai ner")]
You can use the private key associated with any issued/installed X509
Certificate by specifying the corresponding keycontainer for the cert. If
you do this, you might have to specify the CurrentUser store using:
sn -m n
(sn looks for Machine keycontainer names only).
For whether it is possible to use an existing PKCS#12 file to sign an
assembly, I will contact our specialiast on it to see if it could be done
and reply here as soon as pobbile. If you have any more concerns on it,
please feel free to post here.
Best regards,
Yanhong Huang
Microsoft Community Support
Get Secure! ¨C [url]www.microsoft.com/security[/url]
This posting is provided "AS IS" with no warranties, and confers no rights.
Yan-Hong Huang[MSFT] Guest
-
Yan-Hong Huang[MSFT] #3
RE: PKCS#12 File to Sign Assemblies?
Hello,
Thanks for your patient. I have got the answer of this question. :)
For Signing:
You have two alternatives to sign executables using PKCS #12 (PFX).
Manual Process:
1. Manually import the PFX file into My or Personal "Current User"
Certificate
Store using mmc.exe.
2. Run signcode.exe -cn MyTestCodeSign -r currentUser -s my app.exe
Where MyTestCodeSign is the common name of the certificate
3. Delete the Certificate and the private key.
Programmatically using CAPICOM:
1. Signer.Load --> Loads a signing certificate from a specified PFX file.
2. SignedCode.Sign --> The Sign method creates an Authenticode digital
signature and signs the executable file specified in the
SignedCode.FileName property.
3. Signer.Certificate.PrivateKey.Delete().
Hope that helps.
Best regards,
Yanhong Huang
Microsoft Community Support
Get Secure! ¨C [url]www.microsoft.com/security[/url]
This posting is provided "AS IS" with no warranties, and confers no rights.
Yan-Hong Huang[MSFT] Guest



Reply With Quote

