문제

Folks, I'm working on a certificate authentication app that will authenticate user based on CAC inserted. How do I know when the CAC is inserted / removed? I'll be "catching" that event in C++ or Java. Thanks.

도움이 되었습니까?

해결책

You have two options:

  1. If you go for "low level" (which you apparently want to do) is to use PC/SC level (pcsc-lite) and the SCardGetStatusChange function (or the equivalent in Java, what is javax.smartcardio.CardTerminal.waitForCardPresent())
  2. If you're working with higher level abstractions and go for PKCS#11 (and if your PKCS#11 provider implements it correctly), C_WaitForSlotEvent can be used.

다른 팁

You might see if it is reported through udev.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top