CAPICOM signing problem

From: Juan Segarra Montesinos (sa085144_at_anubis.uji.es)
Date: 05/17/05

  • Next message: Fabrizio: "SCardGetStatusChange"
    Date: Tue, 17 May 2005 12:32:15 +0200
    
    

    Hi. I've developed a custom CSP and Certificate Store Provider. I was
    testing CAPICOM and trying to sign a document with my csp. I always get an
    error in the signing process.

    I've been watching the logs of my CSP and the Crypto SPI functions called
    are (in this order):

    CPAcquireContext
    CPGetUserKey
    CPExportKey
    CPDestroyKey
    CPReleaseContext

    CPExportKey returns a NTE_BAD_KEY_STATE error because my keys are stored
    as non-exportable. If i store them as exportable CAPICOM returns no error
    and the signature is correctly verified.

    Any idea of what can i'm doing wrong? I don't know why CAPICOM is trying
    to export a key that is not exportable and don't need to be exportable...

    Thanks in advance.

            Juan.


  • Next message: Fabrizio: "SCardGetStatusChange"