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.CapiLogin

For 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.CapiLogin
 
Number of identities found: 17
1. cn=CAPI Export,o=Jarman,c=CA
2. cn=ESPSub2User1 Prerollover,o=Nietzsche,c=DE
3. cn=ESPSubUser2 Prerollover,o=de Beauvoir,c=FR
4. cn=ESPSubUser1 Prerollover,o=de Beauvoir,c=FR
5. cn=ESP Test1,o=entrust,c=ca
6. cn=Exportable Identity,ou=PKI7,o=Java Toolkit Samples,c=CA
7. cn=EntellSub2User1 PostRollover,o=Nietzsche,c=DE
8. cn=LegoSub2User2 Prerollover,o=Nietzsche,c=DE
9. cn=Roaming User2,o=Sartre,c=CA
10. cn=SLB3Key Test1,o=Nietzsche,c=DE
11. cn=Dan FourKey,o=entrust,c=ca
12. cn=Dan OneKeyPair,o=entrust,c=ca
13. cn=EntellSubUser3 Prerollover,o=de Beauvoir,c=FR
14. cn=ESPSubUser3 Prerollover,o=de Beauvoir,c=FR
15. cn=ESP User1,o=Sartre,c=CA
16. cn=FourKeys Identity1,ou=PKI7,o=Java Toolkit Samples,c=CA
17. cn=Nonrepudiation Identity1,ou=PKI7,o=Java Toolkit Samples,c=CA
Enter index of identity to log in to:
10
 
Successfully signed and verified message
 
Number of calls to finalize() that had non-trivial effect: 0
Number of providers in use: 0
Used provider handles:
 
Number of keys in use: 0
Used key handles:
 
Number of hashes in use: 0
Used hash handles:
 
Number of cert stores in use: 0
Used cert store handles:
 
Number of cert contexts in use: 0
Used cert context handles:
 
Number of cert chain contexts in use: 0
Used cert chain context handles: