<div>I am loading a certificate from micrsoft certrificate store.&nbsp; From that I get <font size="2">PCCERT_CONTEXT.&nbsp; From this PCCERT_CONTEXT, I extract the member that contains the public key blob which I write in binary format into a file.
</font></div>
<div><font size="2">I read from this file and send the contents to x<font size="2">mlSecCryptoAppKeyLoadMemory().&nbsp; So which format should i specify in this condition from the given below list</font></font></div>
<div>
<table class="variablelist" cellspacing="0" cellpadding="4" border="0">
<tbody>
<tr>
<td valign="top" align="left"><a name="AEN6196"><span style="WHITE-SPACE: nowrap"><var class="LITERAL">xmlSecKeyDataFormatUnknown</var></span></a></td>
<td valign="top" align="left">
<p>the key data format is unknown.</p></td></tr>
<tr>
<td valign="top" align="left"><a name="AEN6201"><span style="WHITE-SPACE: nowrap"><var class="LITERAL">xmlSecKeyDataFormatBinary</var></span></a></td>
<td valign="top" align="left">
<p>the binary key data.</p></td></tr>
<tr>
<td valign="top" align="left"><a name="AEN6206"><span style="WHITE-SPACE: nowrap"><var class="LITERAL">xmlSecKeyDataFormatPem</var></span></a></td>
<td valign="top" align="left">
<p>the PEM key data (cert or public/private key).</p></td></tr>
<tr>
<td valign="top" align="left"><a name="AEN6211"><span style="WHITE-SPACE: nowrap"><var class="LITERAL">xmlSecKeyDataFormatDer</var></span></a></td>
<td valign="top" align="left">
<p>the DER key data (cert or public/private key).</p></td></tr>
<tr>
<td valign="top" align="left"><a name="AEN6216"><span style="WHITE-SPACE: nowrap"><var class="LITERAL">xmlSecKeyDataFormatPkcs8Pem</var></span></a></td>
<td valign="top" align="left">
<p>the PKCS<font size="+0"><span class="TYPE">8</span></font> PEM private key.</p></td></tr>
<tr>
<td valign="top" align="left"><a name="AEN6223"><span style="WHITE-SPACE: nowrap"><var class="LITERAL">xmlSecKeyDataFormatPkcs8Der</var></span></a></td>
<td valign="top" align="left">
<p>the PKCS<font size="+0"><span class="TYPE">8</span></font> DER private key. </p></td></tr>
<tr>
<td valign="top" align="left"><a name="AEN6230"><span style="WHITE-SPACE: nowrap"><var class="LITERAL">xmlSecKeyDataFormatPkcs12</var></span></a></td>
<td valign="top" align="left">
<p>the PKCS12 format (bag of keys and certs)</p></td></tr>
<tr>
<td valign="top" align="left"><a name="AEN6235"><span style="WHITE-SPACE: nowrap"><var class="LITERAL">xmlSecKeyDataFormatCertPem</var></span></a></td>
<td valign="top" align="left">
<p>the PEM cert.</p></td></tr>
<tr>
<td valign="top" align="left"><a name="AEN6240"><span style="WHITE-SPACE: nowrap"><var class="LITERAL">xmlSecKeyDataFormatCertDer</var></span></a></td>
<td valign="top" align="left">
<p>the DER cert.</p></td></tr></tbody></table></div>
<div><font size="2">Thanks and regards</font></div>
<div><font size="2">Yesh</font><br><br>&nbsp;</div>
<div><span class="gmail_quote">On 12/18/06, <b class="gmail_sendername">Aleksey Sanin</b> &lt;<a href="mailto:aleksey@aleksey.com">aleksey@aleksey.com</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">If you use PEM format, it should be in PEM format, if you use DER<br>format, it should be in DER format, and so on.
<br><br>Aleksey<br><br>Yeshwanth C wrote:<br>&gt; I even converted the file to base 64 but still the same error &quot;invalid<br>&gt; format&quot; 1.&nbsp;&nbsp;What should teh file format be?<br>&gt; Pasted here is the file contents
<br>&gt;<br>&gt; MIGJAoGBAM9oqhVJrRkG4Dbc1nLhpNWH1X4+U45ktc+kZD6H6gG+F/LmqA2YEZgCKJqWzjLG8MV4<br>&gt;<br>&gt; y/8r0XDmOfCc/6i75a/h2zFphu5fakl7hZ/OshDLHgfvkr4tiIqj8JE5E6WZzFCRq4beLzrsdgG/<br>&gt;<br>&gt; FEeP6PWoCdqHVzHCAX8c7h10QvqFAgMBAAE
<br>&gt;<br>&gt;<br>&gt;<br>&gt; REgards<br>&gt; yesh<br>&gt;<br></blockquote></div><br>