Can sn.exe utilize the Windows certificate store?



For signing an assembly with sn.exe in .NET, is it possible to specify a
public key for which the private key is contained only within the
Windows CryptoAPI keystore?

I see the option for specifying the CSP name, and the container name.

Are there values to use to access the Windows certificates? (i.e. those
accessible from Windows EFS, Outlook, Internet Explorer, etc.)

Specifically, I am asking this because there are a few keys which do not
have the private key marked as exportable, so I cannot export a .pfx and
follow that route.

Thank you.

I found the MSDN article on Machine Stores, but this is dealing with
ActiveDirectory Rights Management. I also cannot find the DRM directory
it talks about. Though, there was a directory Application
Data\Microsoft\Crypto\RSA\MachineKeys, and several files named with just
a serial number or GUID.
(256bit-hex)_(32bit)-(16bit)-(16bit)-(16-bit)-(48bit) is the format of
the filename. Are these usable/addressable to identify the public key to
sn.exe? I suspect this is not what I am looking for...

-- Maxwell


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question