title: How to connect to HTTPS server using Common Access Card
body: <p>I need to write a java program to connect to a HTTPS server (DoD website). The website requires CAC (DoD common access card) authentication. If you access this site via browser, you insert your CAC first, and then enter a PIN.</p>
  
  <p>I need to accomplish the authentication process programmatically in java (kind of acting like browser). How do I retrieve the information from the CAC? I have been Googling around and read the Java PKCS#11 Reference Guide. Seems like Sun PKCS#11 Provider can do it, but you need the native PKCS#11 token implementation. </p>
  
  <p>Am I right? Has anybody done this before? Any suggestion or comment will be greatly appreciated.</p>