<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=760142513-09102006><FONT face=Arial
size=2>Hi,</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>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><FONT face=Arial
size=2></FONT></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><FONT face=Arial size=2></FONT> </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><FONT face=Arial size=2></FONT> </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><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><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>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><FONT face=Arial
size=2></FONT></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><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=760142513-09102006><FONT face=Arial
size=2>Thanks</FONT></SPAN></DIV>
<DIV><SPAN class=760142513-09102006></SPAN> </DIV></BODY></HTML>