Running WriteEpfToToken
This WriteEpfToToken sample application writes an Entrust .epf file to a PKCS #11 device
Not all PKCS #11 devices support this sample.
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.pkcs11.WriteEpfToToken <slot> <p11> <pwd> [<apf_name> <apf_file> | <epf_file>]|
Parameter |
Value |
|
<slot> |
The identifier of the smart card slot. |
|
<p11> |
The path of the PKCS #11 library provided by the smart card vendor. |
|
<pwd> |
The password for accessing the card and the Entrust profile. |
|
<apf_file> |
The file path of the auxiliary profile, without the .aux extension, |
|
<apf_name> |
The name of the Auxiliary Profile, |
|
<epf_file> |
The file path of an Entrust profile, without the .aux extension, |
For example:
C:\etjava\examples>java -classpath classes;../lib/enttoolkit.jar com.entrust.toolkit.examples.pkcs11.WriteEpfToToken 11 p11.dll Passw0rd ./MyUserEPFWrite an EPF to a Token------------------------Attempting to write the EPF to the token...SUCCESS: write EPF to token completeAttempting to log in to the token...SUCCESS: token login completeSign/Verify Test----------------Attempt sign operation using the user's signing key...data to sign: 54:65:73:74:20:44:61:74:61signature: 0E:DF:76:9D:E2:C8:CA:4C:FD:4F:52:88:E7:6E:BF:22:F0:4D:A8:D4:49:AA:C5:65:05:D3:91:B1:FB:F4:53:ED:01:EC:20:11:BD:79:46:C0:8E:CC:58:BE:B5:C0:E9:12:20:9C:C6:0E:07:EB:87:03:B0:EE:0A:C8:56:F8:2B:06:44:ED:7D:CB:0C:46:1A:FC:A1:8D:55:5F:09:B3:46:45:44:01:65:F6:97:0E:3E:1B:E8:10:2C:A8:F9:BE:ED:2F:53:65:4F:8D:AE:DA:D6:DD:01:AA:78:3E:F0:2A:EB:A5:BA:ED:3A:78:51:AA:C4:59:99:E1:3D:95:05:43:CB:1BAttempt verify operation using the user's verification certificate with serial number '1051721591'...data that was signed: 54:65:73:74:20:44:61:74:61signatrue verified: trueEncryption/Decryption Test--------------------------Attempt encrypt operation using the user's encryption certificate with serial number '1051721592'...plaintext: 54:65:73:74:20:44:61:74:61ciphertext: 91:BD:A1:24:E9:12:CD:67:EF:D3:8D:60:12:23:84:64:E2:39:DF:AF:83:03:1D:CE:8B:2E:2D:C5:C0:16:FE:38:83:87:D2:FF:87:CD:D2:91:CB:DA:BD:D9:87:5F:4D:9B:DB:20:A4:00:CB:C4:BF:E8:68:02:A3:5D:54:B9:D0:82:A5:DD:91:2F:EB:4D:1C:AA:E1:3C:52:6B:47:4F:1D:54:B3:2C:D7:E9:FE:93:89:19:AC:77:62:67:E3:B6:5A:C6:5F:8E:BE:14:E4:C7:BE:55:A2:3D:6B:90:D6:BA:05:B1:1D:4B:E5:FB:4F:55:4E:EA:B6:7E:6C:11:61:A9:BD:1AAttempt decrypt operation using the user's corresponding decryption private key...ciphertext: 91:BD:A1:24:E9:12:CD:67:EF:D3:8D:60:12:23:84:64:E2:39:DF:AF:83:03:1D:CE:8B:2E:2D:C5:C0:16:FE:38:83:87:D2:FF:87:CD:D2:91:CB:DA:BD:D9:87:5F:4D:9B:DB:20:A4:00:CB:C4:BF:E8:68:02:A3:5D:54:B9:D0:82:A5:DD:91:2F:EB:4D:1C:AA:E1:3C:52:6B:47:4F:1D:54:B3:2C:D7:E9:FE:93:89:19:AC:77:62:67:E3:B6:5A:C6:5F:8E:BE:14:E4:C7:BE:55:A2:3D:6B:90:D6:BA:05:B1:1D:4B:E5:FB:4F:55:4E:EA:B6:7E:6C:11:61:A9:BD:1Aplaintext: 54:65:73:74:20:44:61:74:61DONE