CryptImportKey fails
From: Hector (HEPETI_at_yahoo.es)
Date: 11/05/04
- Previous message: Wahaj: "Smart Card using T1 or T0 Commands with Datakey"
- Next in thread: lelteto: "RE: CryptImportKey fails"
- Reply: lelteto: "RE: CryptImportKey fails"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: 5 Nov 2004 02:39:41 -0800
Hi everybody,
I'm developing my own Smart Card CSP. I don't have crypto smart cards,
so I have to load private key into my CSP from my Scard for signing
working (which I do with Microsoft Base Provider).Indeed, when I call
CryptSignHash, my CSP is loading adn importing my private key
internally, and after the sign is done with the Base Provider.
CryptImportKey fails only in this case: For example, after calling
CryptAcquireContext and doing hash functions (CreateHash,HashData), I
can get my sign without any problem. After doing it, I release the
context and I delete everything (key container, hash...) But, if I
repeat the same process just after releasing the context
(CryptAcquireContext,Hash functions and finally CryptSignHash),
CryptImportKey function fails with NTE_BAD_VERSION error.
What's more, if I call CryptImportKey function more times with the
same context, it works fine.
Any help would be appreciated,
Regards
Héctor Pérez Tijero - University of Cantabria
- Previous message: Wahaj: "Smart Card using T1 or T0 Commands with Datakey"
- Next in thread: lelteto: "RE: CryptImportKey fails"
- Reply: lelteto: "RE: CryptImportKey fails"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|