[xmlsec] Pin Caching

Wouter wsh333 at gmail.com
Mon Oct 9 12:44:30 PDT 2006


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?

Wouter

Jürgen Heiss wrote:
> 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
>  
> ------------------------------------------------------------------------
>
> _______________________________________________
> xmlsec mailing list
> xmlsec at aleksey.com
> http://www.aleksey.com/mailman/listinfo/xmlsec
>   

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.aleksey.com/pipermail/xmlsec/attachments/20061009/7d4eece5/attachment-0002.htm


More information about the xmlsec mailing list