How to extract username from DoD CAC using Java

I am trying to communicate with CAC using Java. From the Developer Kit, I was able to find information on extracting a unique identifier (CHUID) and several other pieces of information, such as applets available on the map. However, I cannot extract the username (LastName.FirstName.MiddleName.ID) from the card, and I also cannot find the documentation for the CAC materials.

I do not use a card to access a secure website. I use it in a desktop application to authenticate users and therefore will not access certificates stored on the card. I can access various applets stored on the map, but I don’t know how to get the username. This username is required to verify users in our system. How can I get username from CAC?

+3
source share
2 answers

, , PKCS # 11, KeyStore, "ID Certificate". X509Certificate keyStore.getCertificate(alias) , , cert.getSubjectX500Principal().getName().

, .

+2

, PKCS # 11, SunPKCS11 CAC, . .

Java- CAC, .

0

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


All Articles