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"

    Relevant Pages

    • Re: CAPICOM signing problem
      ... What version of CAPICOM are you using? ... I've developed a custom CSP and Certificate Store Provider. ... > CPExportKey returns a NTE_BAD_KEY_STATE error because my keys are stored ...
      (microsoft.public.platformsdk.security)
    • Re: CAPICOM signing problem
      ... Private Sub btnSign_Click ... When the certificate selected is linked to a key in a CSP other than mine, ... I don't know why CAPICOM is trying to export the key and do nothing else. ... Perhaps i've something wrong in my CPExportKey implementation... ...
      (microsoft.public.platformsdk.security)
    • CSP calls from CAPICOM SignedData.Sign
      ... I am developing a CSP, at the moment it works perfectly for SSL ... My CSP receives the following calls from CAPICOM: ... CPExportKey ... Dim sStorage As New CAPICOM.Store ...
      (microsoft.public.platformsdk.security)