How to enter a PIN code to access the smart card programmatically?

I use certificates to protect my messages between client and server (no code, only for endpoint configuration). Certificates are currently stored on ACOS5 smart cards. Everything works very well, except that every time WCF creates a new channel to access the server, the ACOS5 driver asks the user to enter the "user PIN". Unfortunately, this happens quite often.

Is there a way to configure the driver to cache the PIN that the user has already entered in the current process for at least some time, or how can I cache the PIN and provide it each time programmatically for one session?

I found some useful in this article :

This is because in previous versions of Windows, each CSP will cache the PIN you entered, but Windows 7 will actually convert the PIN into a secure token and cache it. Unfortunately, only one global token cache, but CSPs cannot use tokens generated by others, so first the CSP smart card offers you to cache the token, then SSL asks you and caches its own token (overwriting the first one), then the smart card system again asks (because its cached token is gone).

But I can not use the solution proposed by the author. So what should I do?

+3
source share
1 answer

: ​​Advanced Card Systems CSP v1.9. Alladin eToken , . PIN- , CSP . : PIN CSP .

+1

Source: https://habr.com/ru/post/1728523/


All Articles