Running KeyStoreInMemory

The KeyStoreInMemory sample application uses an InputStream to initialize an in-memory key store.

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.keystore.KeyStoreInMemory <epf_file> <epf_pwd> <p12_file> <p12_pwd> [<entrust.ini>]

Parameter

Value

<epf_file>

The path of an Entrust user profile in .epf file format.

<epf_pwd>

The password for accessing the Entrust profile.

<p12_file>

The path of a PCKS #12 file with certificates to include in the new key store.

<p12_pwd>

The password of the PCKS #12 file.

<entrust.ini>

The path of an Entrust initialization file with .ini extension.

For example:

C:\etjava\examples>java -classpath classes;../lib/enttoolkit.jar com.entrust.toolkit.examples.keystore.KeyStoreInMemory data/userdata/RSAUser1.epf ~Sample7~ data/userdata/ExportableIdentityDecryption.p12 ~Sample7~
 
Initializing Toolkit... DONE
Create and load KeyStore from 'data/userdata/RSAUser1.epf'... DONE
Extracting certificate from 'data/userdata/ExportableIdentityDecryption.p12' and
adding them to the KeyStore... DONE
-- CA certificate:
Version: 3
Serial number: 323443746080516009922157294360241865187
Signature algorithm: sha256WithRSAEncryption
Issuer: ou=PKI7,o=Java Toolkit Samples,c=CA
Valid not before: Tue Sep 30 08:25:18 EDT 2003
not after: Sat Sep 30 08:55:18 EDT 2023
Subject: ou=PKI7,o=Java Toolkit Samples,c=CA
public exponent: 10001
modulus: d2007e92bea0e55636020a3e3275cb98d0f5d95113948d854bfe88826f000593f813ef9
d8f2d7ee1e3b25c078a768db290fd02c6d02b71ef836a0ece63a94e1044d0abecaedb4b331c63d0b
bec74792f54234c9b6a431370cf39a3213a66c284b2b2745f899ccdc4a5d2d29dd61d1d8f81193b3
8b45c8073be52a40fda5571521106922f7a8355a7f036e0d7b9d16f9004354a35e0e994b662d1149
75b2cef4bb1d4cf00d04b3a96acf170d399a9419cffc046517e8fe83a1842c93de82ededff1028b6
9606edd03443ec43d32168dad959993e73549169fde2998a90a0088cd7ac98af8e28fd2ca0b23da2
acfdda3d31c38c13eb2a38f1943697787d4c30c69
 
Extensions: 7
Certificate Fingerprint: 8D:16:98:C8:E3:8E:B9:D9:F1:21:B7:9A:15:08:BF:B0
 
 
-- Encryption certificate:
Version: 3
Serial number: 165938286209625758891349076348821777796
Signature algorithm: sha256WithRSAEncryption
Issuer: ou=PKI7,o=Java Toolkit Samples,c=CA
Valid not before: Wed Oct 01 10:52:20 EDT 2003
not after: Wed Oct 01 11:22:20 EDT 2008
Subject: cn=RSA User1,ou=PKI7,o=Java Toolkit Samples,c=CA
public exponent: 10001
modulus: b267ff25e83a54447a31b1c8048347bb8d9786bbac08c87a1c624b35d98e2f3c7db4f5b
e08291b8268001b8d56a6b5fcb845afa334eca7103cd5c5e563fb964f005a54a3ae3cdca1c452dff
d1c9b3a31d38fdacf5ae503dfe0636570b7cc056f3f56de48abd59a259df3d51865a442a8018ac09
1adb6617ad046850ec228eb17
 
Extensions: 6
Certificate Fingerprint: 87:30:47:95:31:D7:E8:53:3D:25:47:FD:F9:B0:8F:C4
 
 
-- Verification certificate:
Version: 3
Serial number: 42994157431027387502580679544934580125
Signature algorithm: sha256WithRSAEncryption
Issuer: ou=PKI7,o=Java Toolkit Samples,c=CA
Valid not before: Wed Oct 01 10:52:20 EDT 2003
not after: Wed Oct 01 11:22:20 EDT 2008
Subject: cn=RSA User1,ou=PKI7,o=Java Toolkit Samples,c=CA
public exponent: 10001
modulus: d11a844dfab25ab9fbbcc9876e291c9c3460f812c5fb8c4d4e780633890c0199dea5b5f
31cb784f9e11894757a6837c76eaa1ef9bc516aa6ea6a1518ca8aa078b3d18cd06173377fcacb4ce
902126866be0209d0fd26636b7152cf66b19ef325512821390f22879d8ffc826fe007aa8194c2f65
51ea9e2d003dc8d00a0a19f7f
 
Extensions: 7
Certificate Fingerprint: 54:8B:03:08:AF:E4:8F:91:A4:9D:4A:EF:6F:08:1E:7F
 
 
-- Certificate 'cert0':
Version: 3
Serial number: 1306233715
Signature algorithm: ecdsa-with-Sha256
Issuer: ou=PKI7,o=Java Toolkit Samples,c=CA
Valid not before: Wed Oct 01 11:05:45 EDT 2003
not after: Wed Oct 01 11:35:45 EDT 2008
Subject: cn=Exportable Identity,ou=PKI7,o=Java Toolkit Samples,c=CA
public exponent: 10001
modulus: aaec47c1ae887189628118171457458637aadf256288b7c9ea4aad3f923418adebca07d
05351ed122e8b814813ceb7e923f36f6934737965f854de84b4a947aa73a3c127957aca512d65375
19cc05aa721ee7b6931fd06bbe6b1bee4fcd874eba1f45e1d87e94a81e610a3652da70413e2344a7
8e76ae907ce2cfcc40d61256b
 
Extensions: 8
Certificate Fingerprint: FD:4D:75:6B:BE:78:A3:71:70:B7:6B:53:33:D0:CF:51
 
 
-- Certificate 'cert1':
Version: 3
Serial number: 1306233630
Signature algorithm: ecdsa-with-Sha256
Issuer: ou=PKI7,o=Java Toolkit Samples,c=CA
Valid not before: Tue Sep 30 08:25:18 EDT 2003
not after: Sat Sep 30 08:55:18 EDT 2023
Subject: ou=PKI7,o=Java Toolkit Samples,c=CA
public exponent: 10001
modulus: d2007e92bea0e55636020a3e3275cb98d0f5d95113948d854bfe88826f000593f813ef9
d8f2d7ee1e3b25c078a768db290fd02c6d02b71ef836a0ece63a94e1044d0abecaedb4b331c63d0b
bec74792f54234c9b6a431370cf39a3213a66c284b2b2745f899ccdc4a5d2d29dd61d1d8f81193b3
8b45c8073be52a40fda5571521106922f7a8355a7f036e0d7b9d16f9004354a35e0e994b662d1149
75b2cef4bb1d4cf00d04b3a96acf170d399a9419cffc046517e8fe83a1842c93de82ededff1028b6
9606edd03443ec43d32168dad959993e73549169fde2998a90a0088cd7ac98af8e28fd2ca0b23da2
acfdda3d31c38c13eb2a38f1943697787d4c30c69
 
Extensions: 7
Certificate Fingerprint: 8D:16:98:C8:E3:8E:B9:D9:F1:21:B7:9A:15:08:BF:B0