By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,853 Members | 1,027 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,853 IT Pros & Developers. It's quick & easy.

Signing XML with X509 certificate, hide private key?

P: n/a

I'm new to cryptography and I would just like to check that I'm doing
the right thing when signing an XML file. I've got a PKCS#12
certificate (created using OpenSSL) which I'm loading into a
X509Certificate2 object. I get the private key out of that object to
sign with, and I include the certificate in the KeyInfo object.
However, as both the private and public key is stored in the same
certificate file, doesn't this mean that I'm including the private
key? And isn't that A Very Bad Thing? As I said, I'm new to this so
don't fully understand the way it should be done.

If this is the way to go forwards, can I strip out the private key
from the certificate before including it? Or is there another way of
doing this?

Any help is much appreciated.


Nov 10 '08 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.