Embedding 509 cert info into xml file
<p>I have c# code to sign an xml that is very similar to this post:
<a href="http://stackoverflow.com/questions/5330049/java-equivalent-of-c-sharp-xml-signing-method">Java equivalent of C# XML signing method</a></p>

<p>Specifically, I am interested in this section:</p>

<pre><code>// embed public key information for signature validation purposes
KeyInfo keyInfo = new KeyInfo();
KeyInfoX509Data keyInfoX509Data = new KeyInfoX509Data(certificate, X509IncludeOption.ExcludeRoot);
keyInfo.AddClause(keyInfoX509Data);
signedXml.KeyInfo = keyInfo;
</code></pre>

<p>My question is, does this code embed any private key information in the xml file? The comment of the code implies that it does not, which is good. I do not want to be embedding private key data in my xml file. But I am rather new to signing and it would be very bad if I did include private key data so I thought I would ask here. I tried first checking the microsoft doc on KeyInfoX509Data here: <a href="http://msdn.microsoft.com/en-us/library/t95xse03.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/t95xse03.aspx</a> ,but that did not answer my question.</p>
