Running CapiLogin
The CapiLogin sample application logs in a user with Microsoft CryptoAPI-managed credentials, signs data, and verifies the signature.
To run this sample application, execute the following command line in the etjava/examples directory.
java -classpath classes;../lib/enttoolkit.jar com.entrust.toolkit.examples.capi.CapiLoginFor example:
The below output does include the authorization dialog displayed after entering the identity to log in.
C:\etjava\examples>java -classpath classes;..\lib\enttoolkit.jar com.entrust.toolkit.examples.capi.CapiLoginNumber of identities found: 171. cn=CAPI Export,o=Jarman,c=CA2. cn=ESPSub2User1 Prerollover,o=Nietzsche,c=DE3. cn=ESPSubUser2 Prerollover,o=de Beauvoir,c=FR4. cn=ESPSubUser1 Prerollover,o=de Beauvoir,c=FR5. cn=ESP Test1,o=entrust,c=ca6. cn=Exportable Identity,ou=PKI7,o=Java Toolkit Samples,c=CA7. cn=EntellSub2User1 PostRollover,o=Nietzsche,c=DE8. cn=LegoSub2User2 Prerollover,o=Nietzsche,c=DE9. cn=Roaming User2,o=Sartre,c=CA10. cn=SLB3Key Test1,o=Nietzsche,c=DE11. cn=Dan FourKey,o=entrust,c=ca12. cn=Dan OneKeyPair,o=entrust,c=ca13. cn=EntellSubUser3 Prerollover,o=de Beauvoir,c=FR14. cn=ESPSubUser3 Prerollover,o=de Beauvoir,c=FR15. cn=ESP User1,o=Sartre,c=CA16. cn=FourKeys Identity1,ou=PKI7,o=Java Toolkit Samples,c=CA17. cn=Nonrepudiation Identity1,ou=PKI7,o=Java Toolkit Samples,c=CAEnter index of identity to log in to:10Successfully signed and verified messageNumber of calls to finalize() that had non-trivial effect: 0Number of providers in use: 0Used provider handles:Number of keys in use: 0Used key handles:Number of hashes in use: 0Used hash handles:Number of cert stores in use: 0Used cert store handles:Number of cert contexts in use: 0Used cert context handles:Number of cert chain contexts in use: 0Used cert chain context handles: