<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<style>
<!--
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;
        text-decoration:underline;}
code
        {font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:Arial;
        color:windowtext;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
        {page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Hi, All:<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I have a simple question. I have an XML document like
following.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><code><font size=2
face="Courier New"><span style='font-size:10.0pt'>&lt;?xml
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;&gt;</span></font></code><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><br>
<code><font face="Courier New">&lt;Root&gt;</font></code><br>
<code><font face="Courier New">&nbsp;&nbsp;&lt;Data Id=&quot;1234&quot;&gt;</font></code><br>
<code><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;The data I want to sign</font></code><br>
<code><font face="Courier New">&nbsp;&nbsp;&lt;/Data&gt;</font></code><br>
<code><font face="Courier New">&lt;/Root&gt;</font></code></span></font><o:p></o:p></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I would like to sign &lt;Data&gt; node with different keys
like, rsa_private_key1.pem and rsa_private_key2.pem. How do I do that with the xmlsec
app (xmlsec1)?<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I create a template with two &lt;Signature&gt; nodes in the
same XML document. &#8220;xmlsec1&#8221; always signs the first
&lt;Signature&gt; node.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal style='margin-left:.5in'><code><font size=2
face="Courier New"><span style='font-size:10.0pt'>&lt;?xml
version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;&gt;</span></font></code><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><br>
<code><font face="Courier New">&lt;Root&gt;</font></code><br>
<code><font face="Courier New">&nbsp;&nbsp;&lt;Data Id=&quot;1234&quot;&gt;</font></code><br>
<code><font face="Courier New">&nbsp;&nbsp;&nbsp;&nbsp;The data I want to sign</font></code><br>
<code><font face="Courier New">&nbsp;&nbsp;&lt;/Data&gt;<o:p></o:p></font></code></span></font></p>

<p class=MsoNormal><code><font size=2 face="Courier New"><span
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></code></p>

<p class=MsoNormal><code><font size=2 face="Courier New"><span
style='font-size:10.0pt'>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&lt;Signature&gt;<o:p></o:p></span></font></code></p>

<p class=MsoNormal><code><font size=2 face="Courier New"><span
style='font-size:10.0pt'>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;. . .<o:p></o:p></span></font></code></p>

<p class=MsoNormal style='text-indent:.5in'><code><font size=2
face="Courier New"><span style='font-size:10.0pt'>&nbsp;&nbsp;&nbsp; &lt;Reference URI=&#8221;#1234&#8221;&gt;
. . . &lt;/Reference&gt;<o:p></o:p></span></font></code></p>

<p class=MsoNormal><code><font size=2 face="Courier New"><span
style='font-size:10.0pt'>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;. . .<o:p></o:p></span></font></code></p>

<p class=MsoNormal><code><font size=2 face="Courier New"><span
style='font-size:10.0pt'>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&lt;/Signature&gt;<o:p></o:p></span></font></code></p>

<p class=MsoNormal><code><font size=2 face="Courier New"><span
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></code></p>

<p class=MsoNormal><code><font size=2 face="Courier New"><span
style='font-size:10.0pt'>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&lt;Signature&gt;<o:p></o:p></span></font></code></p>

<p class=MsoNormal><code><font size=2 face="Courier New"><span
style='font-size:10.0pt'>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;. . .<o:p></o:p></span></font></code></p>

<p class=MsoNormal style='text-indent:.5in'><code><font size=2
face="Courier New"><span style='font-size:10.0pt'>&nbsp;&nbsp;&nbsp; &lt;Reference URI=&#8221;#1234&#8221;&gt;
. . . &lt;/Reference&gt;<o:p></o:p></span></font></code></p>

<p class=MsoNormal><code><font size=2 face="Courier New"><span
style='font-size:10.0pt'>&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;. . .<o:p></o:p></span></font></code></p>

<p class=MsoNormal style='margin-left:.5in'><code><font size=2
face="Courier New"><span style='font-size:10.0pt'>&nbsp; &lt;/Signature&gt;</span></font></code><font
size=2 face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New"'><br>
<code><font face="Courier New">&lt;/Root&gt;<o:p></o:p></font></code></span></font></p>

<p class=MsoNormal><code><font size=2 face="Courier New"><span
style='font-size:10.0pt'><o:p>&nbsp;</o:p></span></font></code></p>

<p class=MsoNormal><code><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I tried &#8220;xmlsec1 &#8211;sign &#8211;private-pem
rsa_private_key1.pem template.xml &gt; tmp.xml&#8221;, and then &#8220;xmlsec1 &#8211;sign
&#8211;private-pem rsa_private_key2.pem tmp.xml&#8221;. I did not have any
luck.<o:p></o:p></span></font></code></p>

<p class=MsoNormal><code><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></code></p>

<p class=MsoNormal><code><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>I am not sure that I did it right. Any help would be
appreciated.<o:p></o:p></span></font></code></p>

<p class=MsoNormal><code><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></code></p>

<p class=MsoNormal><code><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>Thanks.<o:p></o:p></span></font></code></p>

<p class=MsoNormal><code><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'>--Yunhong<o:p></o:p></span></font></code></p>

<p class=MsoNormal><font size=2 face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New"'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p>&nbsp;</o:p></span></font></p>

</div>

</body>

</html>