Re: Service caching Smart Card credentials
From: Edson E. W (e_at_e.w)
Date: 10/07/03
- Next message: Peter Tracy: "Reading Values from Security Configuration and Analysis Snap-In"
- Previous message: Edson E. W.: "Writing a password entry dialog"
- In reply to: Eric Perlin [MS]: "Re: Service caching Smart Card credentials"
- Next in thread: Nite Jones: "Re: Service caching Smart Card credentials"
- Reply: Nite Jones: "Re: Service caching Smart Card credentials"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Tue, 7 Oct 2003 13:13:31 -0700
You must check your CSP documentation. If your CSP
supports Windows Smartcard Logon, it must support
PP_SIGNATURE_PIN/PP_KEYEXCHANGE_PIN. If it does not
support it, please check alternative ways (for instance,
some versions of Datakey RSA CSP require passing the
DK_EXT_LOGOUT to CryptSetProvParam in order to 'log out'
the card, i.e., forget the password. Some CSPs do not like
NULL passwords etc.) (I have learned it the hard way...)
>-----Original Message-----
>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: Peter Tracy: "Reading Values from Security Configuration and Analysis Snap-In"
- Previous message: Edson E. W.: "Writing a password entry dialog"
- In reply to: Eric Perlin [MS]: "Re: Service caching Smart Card credentials"
- Next in thread: Nite Jones: "Re: Service caching Smart Card credentials"
- Reply: Nite Jones: "Re: Service caching Smart Card credentials"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|