[xmlsec] Pin Caching

Jürgen Heiss jheiss at Mesonic.com
Mon Oct 9 06:28:56 PDT 2006


Hi,
 
I'm using a ReinerSct Card Reader to sign my files. This Card reader use PinCaching. 
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.
 
do 
{
 if(xmlSecDSigCtxInitialize(&dsigCtx, gKeysMngr) < 0) 
   {
    fprintf(stderr, "Error: dsig context initialization failed\n");
    return(-1);
   }
 
   if(xmlSecAppPrepareDSigCtx(&dsigCtx) < 0) 
   {
    fprintf(stderr, "Error: dsig context preparation failed\n");
    goto done;
   }
 
      /* parse template and select start node */
   data = xmlSecAppXmlDataCreate(filename, xmlSecNodeSignature, xmlSecDSigNs);
   if(data == NULL) 
   {
    fprintf(stderr, "Error: failed to load template \"%s\"\n", filename);
    goto done;
   }
      /* sign */
   start_time = clock();
   if(xmlSecDSigCtxSign(&dsigCtx, data->startNode) < 0) 
   {
    fprintf(stderr,"Error: signature failed \n");
    goto done;
   }
 
...
...
}
 
But every time when I call xmlSecDSigCtxSign I have to tell the Pin again to the card reader.
I think this is because xmlSecDSigCtxSign Opens the MsCrypto Sign the file and close MsCrypto again.
 
Does anyone have some ideas?
 
Thanks
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.aleksey.com/pipermail/xmlsec/attachments/20061009/b780a0cd/attachment.htm


More information about the xmlsec mailing list