<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> </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> </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> </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'><?xml
version="1.0" encoding="UTF-8"></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"><Root></font></code><br>
<code><font face="Courier New"> <Data Id="1234"></font></code><br>
<code><font face="Courier New"> The data I want to sign</font></code><br>
<code><font face="Courier New"> </Data></font></code><br>
<code><font face="Courier New"></Root></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> </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 <Data> 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> </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 <Signature> nodes in the
same XML document. “xmlsec1” always signs the first
<Signature> 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> </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'><?xml
version="1.0" encoding="UTF-8"></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"><Root></font></code><br>
<code><font face="Courier New"> <Data Id="1234"></font></code><br>
<code><font face="Courier New"> The data I want to sign</font></code><br>
<code><font face="Courier New"> </Data><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> </o:p></span></font></code></p>
<p class=MsoNormal><code><font size=2 face="Courier New"><span
style='font-size:10.0pt'> <Signature><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></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'> <Reference URI=”#1234”>
. . . </Reference><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></o:p></span></font></code></p>
<p class=MsoNormal><code><font size=2 face="Courier New"><span
style='font-size:10.0pt'> </Signature><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> </o:p></span></font></code></p>
<p class=MsoNormal><code><font size=2 face="Courier New"><span
style='font-size:10.0pt'> <Signature><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></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'> <Reference URI=”#1234”>
. . . </Reference><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></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'> </Signature></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"></Root><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> </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 “xmlsec1 –sign –private-pem
rsa_private_key1.pem template.xml > tmp.xml”, and then “xmlsec1 –sign
–private-pem rsa_private_key2.pem tmp.xml”. 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> </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> </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> </o:p></span></font></p>
<p class=MsoNormal><font size=2 face=Arial><span style='font-size:10.0pt;
font-family:Arial'><o:p> </o:p></span></font></p>
</div>
</body>
</html>