<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
It might depend on the way your signing key is selected. Now it is done
via the template, and therefore probably each time reselected and
reloaded from MS certificate store (and thus from your card), could you
try to load the key inside the application itself and keep it during
the three signatures? Does that make any difference?<br>
<br>
Wouter<br>
<br>
Jürgen Heiss wrote:
<blockquote
cite="midFA1AA9F8FB449E42932DDFAADB76783201567D09@exchange-aut.mesonic.com"
type="cite">
<meta http-equiv="Content-Type" content="text/html; ">
<meta content="MSHTML 6.00.2900.2180" name="GENERATOR">
<div><span class="760142513-09102006"><font face="Arial" size="2">Hi,</font></span></div>
<div><span class="760142513-09102006"></span> </div>
<div><span class="760142513-09102006"><font face="Arial" size="2">I'm
using a ReinerSct Card Reader to sign my files. This Card reader use
PinCaching. </font></span></div>
<div><span class="760142513-09102006"><font face="Arial" size="2">This
means if I want to sign 3 files I only need to type in the PinCount and
the PIN one time on the CardReader.</font></span></div>
<div><span class="760142513-09102006"></span> </div>
<div><span class="760142513-09102006"><font face="Arial" size="2">do </font></span></div>
<div><span class="760142513-09102006"><font face="Arial" size="2">{</font></span></div>
<div><span class="760142513-09102006"><font face="Arial" size="2"> if(xmlSecDSigCtxInitialize(&dsigCtx,
gKeysMngr) < 0) <br>
{<br>
fprintf(stderr, "Error: dsig context initialization failed\n");<br>
return(-1);<br>
}</font></span></div>
<div> </div>
<div><span class="760142513-09102006"><font face="Arial" size="2"> if(xmlSecAppPrepareDSigCtx(&dsigCtx)
< 0) <br>
{<br>
fprintf(stderr, "Error: dsig context preparation failed\n");<br>
goto done;<br>
}</font></span></div>
<div> </div>
<div><span class="760142513-09102006"><font face="Arial" size="2">
/* parse template and select start node */<br>
data = xmlSecAppXmlDataCreate(filename, xmlSecNodeSignature,
xmlSecDSigNs);<br>
if(data == NULL) <br>
{<br>
fprintf(stderr, "Error: failed to load template \"%s\"\n",
filename);<br>
goto done;<br>
}<br>
/* sign */<br>
start_time = clock();<br>
if(xmlSecDSigCtxSign(&dsigCtx, data->startNode) < 0) <br>
{<br>
fprintf(stderr,"Error: signature failed \n");<br>
goto done;<br>
}</font></span></div>
<div><span class="760142513-09102006"></span> </div>
<div><span class="760142513-09102006"><font face="Arial" size="2">...</font></span></div>
<div><span class="760142513-09102006"><font face="Arial" size="2">...</font></span></div>
<div><span class="760142513-09102006"><font face="Arial" size="2">}</font></span></div>
<div><span class="760142513-09102006"></span> </div>
<div><span class="760142513-09102006"><font face="Arial" size="2">But
every time when I call xmlSecDSigCtxSign I have to tell the Pin again
to the card reader.</font></span></div>
<div><span class="760142513-09102006"><font face="Arial" size="2">I
think this is because xmlSecDSigCtxSign Opens the MsCrypto Sign the
file and close MsCrypto again.</font></span></div>
<div><span class="760142513-09102006"></span> </div>
<div><span class="760142513-09102006"><font face="Arial" size="2">Does
anyone have some ideas?</font></span></div>
<div><span class="760142513-09102006"></span> </div>
<div><span class="760142513-09102006"><font face="Arial" size="2">Thanks</font></span></div>
<div><span class="760142513-09102006"></span> </div>
<pre wrap="">
<hr size="4" width="90%">
_______________________________________________
xmlsec mailing list
<a class="moz-txt-link-abbreviated" href="mailto:xmlsec@aleksey.com">xmlsec@aleksey.com</a>
<a class="moz-txt-link-freetext" href="http://www.aleksey.com/mailman/listinfo/xmlsec">http://www.aleksey.com/mailman/listinfo/xmlsec</a>
</pre>
</blockquote>
<br>
</body>
</html>