Running CreateUser
The CreateUser sample application creates an Entrust digital identity on a PKCS #11 device.
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.CreateUser <ca_ip> <ca_port> <dir_ip> <dir_port> <ref> <code> <slot> <p11> <card_pwd> <apf_file> <apf_name>|
Parameter |
Value |
|
<ca_ip> |
The hostname or IP address of an Entrust Certification Authority. |
|
<port> |
The port for accessing the Entrust Certification Authority. |
|
<dir_ip> |
The hostname or IP address of the Entrust Certificate Authority directory. |
|
<dir_port> |
The port for accessing the Entrust Certificate Authority directory. |
|
<ref> |
The reference number of the Entrust user for which the certificate is requested. |
|
<code> |
The authorization code of the Entrust user for which the certificate is requested. |
|
<slot> |
The identifier of the smart card slot. |
|
<p11> |
The path of the PKCS #11 library provided by the smart card vendor. |
|
<card_pwd> |
The password for accessing the smart card. |
|
<apf_file> |
The file path of the auxiliary profile, without the .aux extension, |
|
<apf_name> |
The name of the Auxiliary Profile, |
For example:
C:\etjava\examples>java -classpath classes;../lib/enttoolkit.jar com.entrust.toolkit.examples.pkcs11.CreateUser myECA.domain.com 829 myDirectory.domain.com 389 51721585 BGFV-YLW9-G7P4 11 p11.dll Passw0rd ./MyUserUser Creation on a Token------------------------Attempting to create a user on the token...SUCCESS: user creation completeSign/Verify Test----------------Attempt sign operation using the user's signing key...data to sign: 54:65:73:74:20:44:61:74:61signature: 36:A1:B6:65:4D:6A:B1:83:AD:96:8F:14:FF:80:5D:D4:1E:F0:D1:DF:0A:C6:23:96:E1:BA:5A:1A:CE:B3:8B:1E:7C:CA:62:B8:DC:2A:82:D4:7C:6E:CB:DB:6F:A9:05:B8:90:9C:9A:49:02:47:ED:55:ED:EC:9A:8B:73:DE:50:D9:21:D6:E6:28:19:35:04:AF:F8:7B:0B:13:38:18:34:14:4D:1F:6D:03:26:5E:61:08:FB:AA:85:7A:2B:06:75:A0:1C:EC:BB:76:5C:EB:3B:D3:A9:51:19:95:CE:B8:35:83:D1:94:14:29:8A:A1:43:92:87:8D:A0:7F:8C:80:D9:F1Attempt verify operation using the user's verification certificate with serial number '1051721587'...data that was signed: 54:65:73:74:20:44:61:74:61signature verified: trueEncryption/Decryption Test--------------------------Attempt encrypt operation using the user's encryption certificate with serial number '1051721586'...plaintext: 54:65:73:74:20:44:61:74:61ciphertext: 1A:42:8F:2B:85:CE:6F:ED:0B:CE:5E:52:8F:21:B5:A7:25:1F:5C:C2:9D:CA:BA:71:BE:50:C7:E6:3B:E9:AC:15:16:52:22:85:42:CF:C4:CF:F8:F2:7A:9A:91:7F:25:8F:F4:67:F1:E5:C6:8E:B6:0A:F3:EC:34:39:14:20:CD:ED:31:36:37:B1:6C:AD:11:CF:B8:50:BA:19:BC:E7:B0:58:CC:8B:E8:AE:4B:58:E9:8E:07:1C:93:0B:31:02:8D:D1:12:48:D0:B2:40:68:6E:F0:1C:BF:34:FA:2C:99:0A:63:9B:13:8C:0C:98:FC:18:D0:22:AD:E1:00:5E:80:C0:9AAttempt decrypt operation using the user's corresponding decryption private key...ciphertext: 1A:42:8F:2B:85:CE:6F:ED:0B:CE:5E:52:8F:21:B5:A7:25:1F:5C:C2:9D:CA:BA:71:BE:50:C7:E6:3B:E9:AC:15:16:52:22:85:42:CF:C4:CF:F8:F2:7A:9A:91:7F:25:8F:F4:67:F1:E5:C6:8E:B6:0A:F3:EC:34:39:14:20:CD:ED:31:36:37:B1:6C:AD:11:CF:B8:50:BA:19:BC:E7:B0:58:CC:8B:E8:AE:4B:58:E9:8E:07:1C:93:0B:31:02:8D:D1:12:48:D0:B2:40:68:6E:F0:1C:BF:34:FA:2C:99:0A:63:9B:13:8C:0C:98:FC:18:D0:22:AD:E1:00:5E:80:C0:9Aplaintext: 54:65:73:74:20:44:61:74:61DONE