Using A3 certificate with a Service

758 views Asked by At

I'm using without any error A1 certificates (digital certificate) with in a Service.

A3 certificates (SmartCard) needs a PIN to start working. The problem is that the Service won't show any window to input the PIN.

Is there a way to make the service show the PIN window?

1

There are 1 answers

3
jariq On

I guess your service is using Microsoft CryptoAPI to interact with the smartcard. While this is the easiest approach in most cases it does not give you full control over the smartcard/application behavior i.e. you cannot control when is the PIN dialog shown, you cannot customize PIN dialog etc.

You can try this approach:

  1. Make sure that windows service called "Interactive Services Detection" is started and running on your system.
  2. Change the properties of your windows service (right click it in the list of services and select "Properties" menu item) and check the "Allow service to interact with desktop" option on "Log On" tab.
  3. Start your service and your desktop should be switched to session0 where the PIN dialog will be shown.

If the above does not work and you can modify the source code of you service then you can try to use PKCS#11 API instead of MS CryptoAPI. PKCS#11 API gives you much more control over your smartcard/application behavior and it can be used conveniently and quickly in .NET applications with Pkcs11Interop library which I am the author of.