Problem with CryptSignMessage use in GINA DLL
From: Ron Currier (rcurrier)
Date: 04/29/04
- Previous message: Pieter Philippaerts: "Re: writing own CSP - do I have to implement all entry points?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Thu, 29 Apr 2004 11:45:11 -0400
I'm writing a GINA DLL (based on PropCert) to read a cert from a
smartcard and use it to sign some data. The code works fine when built
as a console app and run from a command prompt, but fails with "Cannot
find the certificate and private key for decryption" when run as part
of the GINA DLL. The certificate is read from the smartcard correctly
(and I have a valid PCCERT_CONTEXT) but the CryptSignMessage
call fails (as does a call to CryptAcquireCertificatePrivateKey).
Based on other postings related to this error, I'm guessing its a
permissions
problem of some sort. But since this is not a .NET or ASP program and the
certificate is always coming from the smartcard (not a user store), the
other
postings give no clue as to a solution. I suspect that the association
between
the cert and the smartcard has been lost, but don't understand why it would
work when run as a user app. The problem occurs on both w2k and XP.
Any clues would be appreciated.
- Ron
- Previous message: Pieter Philippaerts: "Re: writing own CSP - do I have to implement all entry points?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|