Re: Service caching Smart Card credentials
From: Eric Perlin [MS] (ericperl_at_microsoft.com)
Date: 10/06/03
- Next message: Eric Perlin [MS]: "Re: Winlogon and GINA"
- Previous message: Nitesh Mehrotra: "Service caching Smart Card credentials"
- In reply to: Nitesh Mehrotra: "Service caching Smart Card credentials"
- Next in thread: Edson E. W: "Re: Service caching Smart Card credentials"
- Reply: Edson E. W: "Re: Service caching Smart Card credentials"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 6 Oct 2003 13:56:04 -0700
May I ask which CSP you are using?
Does the PIN prompt happen from the service? How?
If you load a CSP in a service, you should specify CRYPT_SILENT in
CryptAcquireContext.
That will prevent the CSP from displaying its own UI.
PIN caching behavior is not absolutely standard.
In any case, your service can call CryptSetProvParam for PP_SIGNATURE_PIN or
PP_KEYEXCHANGE_PIN with a NULL PIN.
This should cause the CSP to flush the cached PIN.
-- Eric Perlin [MS] This posting is provided "AS IS" with no warranties, and confers no rights. --- "Nitesh Mehrotra" <news@nitesh.net> wrote in message news:#FjN0kDjDHA.1004@TK2MSFTNGP09.phx.gbl... > Hi! > > It seems like windows is caching the private key handle if you have a > service (or I am doing something wrong). I am not sure how to fix this. Here > is what I am doing: > > 1. I call CryptAcquireContext from my service. > 2. I open the private key for a cert. > 3. The private key lives on smart card, so user is prompted for the PIN -- > as expected > 4. I use the private key, then close the cert handle > 5. I call CryptReleaseContext(....) > 6. Next time when I repeat this process, the user is not being prompted for > the PIN. If I stop the service, and then restart, the user does get prompted > for the PIN. It seems like the PIN is cached for the lifetime of the > process. > > Does windows/smart card cache the PIN for the private key? Is there > something I can do to make sure that the user is re-prompted for the PIN? I > don't think I have a handle leak. > > thanks > Nitesh > >
- Next message: Eric Perlin [MS]: "Re: Winlogon and GINA"
- Previous message: Nitesh Mehrotra: "Service caching Smart Card credentials"
- In reply to: Nitesh Mehrotra: "Service caching Smart Card credentials"
- Next in thread: Edson E. W: "Re: Service caching Smart Card credentials"
- Reply: Edson E. W: "Re: Service caching Smart Card credentials"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|