Running SMimeSend for S/MIME v3
The SMimeSend sample application for S/MIME v3 sends the following S/MIME messages to a single recipient.
Plain messages.
Implicitly signed messages.
Messages encrypted with the following algorithms:
AlgorithmID.rc2_CBC, 40
AlgorithmID.rc2_CBC, 64
AlgorithmID.rc2_CBC, 128
AlgorithmID.des_CBC, 128
AlgorithmID.des_EDE3_CBC, 128
Implicitly signed and encrypted messages with attachment.
Certificate request.
application/pkcs10 messages with the request as the second part.
To run this sample application, execute the following command line in the etjava/examples directory.
java -classpath ../lib/enttoolkit.jar;<jakarta.mail.jar>;<jakarta.activation.jar>;[<other-mail-providers>] com.entrust.toolkit.examples.smimev3.SMimeSend|
Parameter |
Value |
|
<jakarta.mail.jar> |
<dependency> |
|
<jakarta.activation.jar> |
<dependency> |
|
<other-mail-providers> |
<dependency> <dependency> <dependency> |
For example:
c:\etjava\examples>java -classpath classes;..\lib\enttoolkit.jar;c:\java\lib\mail.jar;c:\java\lib\pop3.jar;c:\java\lib\activation.jar;c:\java\lib\angus-mail.jar com.entrust.toolkit.examples.smimev3.SMimeSendFile Entrust.ini is missing: Entrust.ini (The system cannot find the file specified)Working offline, using certificate file data/userdata/RSAUser2Encryption.cer asrecipientRecipient's Certificate trusted!Algorithm :RSAVersion: 3Serial number: 1064926582Signature algorithm: sha1WithRSAEncryptionIssuer: ou=PKI7,o=Java Toolkit Samples,c=CAValid not before: Wed Oct 01 10:52:20 EDT 2003 not after: Wed Oct 01 11:22:20 EDT 2008Subject: cn=RSA User1,ou=PKI7,o=Java Toolkit Samples,c=CApublic exponent: 10001modulus: d11a844dfab25ab9fbbcc9876e291c9c3460f812c5fb8c4d4e780633890c0199dea5b5f31cb784f9e11894757a6837c76eaa1ef9bc516aa6ea6a1518ca8aa078b3d18cd06173377fcacb4ce902126866be0209d0fd26636b7152cf66b19ef325512821390f22879d8ffc826fe007aa8194c2f6551ea9e2d003dc8d00a0a19f7fExtension 1: not critical AuthorityKeyIdentifierKeyIdentifier: 57:71:8E:26:B1:5D:87:4F:77:9A:4D:0D:58:EF:F5:5B:8B:5D:D7:C7Extension 2: not critical EntrustVersInfoversion: V7.0 00001101Extension 3: not critical CRLDistributionPointsDistributionPoint: directoryName: cn=CRL1,ou=PKI7,o=Java Toolkit Samples,c=CAExtension 4: not critical BasicConstraintsCA: noExtension 5: not critical PrivateKeyUsagePeriodnot before: Wed Oct 01 10:52:20 EDT 2003not after : Mon Apr 02 08:22:20 EDT 2007Extension 6: not critical KeyUsagedigitalSignatureExtension 7: not critical SubjectKeyIdentifier3A:4D:A9:E2:FD:E0:BB:3C:E6:9C:00:8B:3A:1E:74:1E:FE:AC:85:19Certificate Fingerprint: 54:8B:03:08:AF:E4:8F:91:A4:9D:4A:EF:6F:08:1E:7FVersion: 3Serial number: 1064926513Signature algorithm: sha1WithRSAEncryptionIssuer: ou=PKI7,o=Java Toolkit Samples,c=CAValid not before: Tue Sep 30 08:25:18 EDT 2003 not after: Sat Sep 30 08:55:18 EDT 2023Subject: ou=PKI7,o=Java Toolkit Samples,c=CApublic exponent: 10001modulus: d2007e92bea0e55636020a3e3275cb98d0f5d95113948d854bfe88826f000593f813ef9d8f2d7ee1e3b25c078a768db290fd02c6d02b71ef836a0ece63a94e1044d0abecaedb4b331c63d0bbec74792f54234c9b6a431370cf39a3213a66c284b2b2745f899ccdc4a5d2d29dd61d1d8f81193b38b45c8073be52a40fda5571521106922f7a8355a7f036e0d7b9d16f9004354a35e0e994b662d114975b2cef4bb1d4cf00d04b3a96acf170d399a9419cffc046517e8fe83a1842c93de82ededff1028b69606edd03443ec43d32168dad959993e73549169fde2998a90a0088cd7ac98af8e28fd2ca0b23da2acfdda3d31c38c13eb2a38f1943697787d4c30c69Extension 1: not critical AuthorityKeyIdentifierKeyIdentifier: 57:71:8E:26:B1:5D:87:4F:77:9A:4D:0D:58:EF:F5:5B:8B:5D:D7:C7Extension 2: not critical EntrustVersInfoversion: V7.0:4.0 00001001Extension 3: not critical CRLDistributionPointsDistributionPoint: directoryName: cn=CRL1,ou=PKI7,o=Java Toolkit Samples,c=CAExtension 4: not critical BasicConstraintsCA: yesExtension 5: not critical PrivateKeyUsagePeriodnot before: Tue Sep 30 08:25:18 EDT 2003not after : Sat Sep 30 08:55:18 EDT 2023Extension 6: not critical KeyUsagekeyCertSign | cRLSignExtension 7: not critical SubjectKeyIdentifier57:71:8E:26:B1:5D:87:4F:77:9A:4D:0D:58:EF:F5:5B:8B:5D:D7:C7Certificate Fingerprint: 8D:16:98:C8:E3:8E:B9:D9:F1:21:B7:9A:15:08:BF:B0Version: 3Serial number: 1064926586Signature algorithm: sha1WithRSAEncryptionIssuer: ou=PKI7,o=Java Toolkit Samples,c=CAValid not before: Wed Oct 01 10:54:25 EDT 2003 not after: Wed Oct 01 11:24:25 EDT 2008Subject: cn=RSA User2,ou=PKI7,o=Java Toolkit Samples,c=CApublic exponent: 10001modulus: af6c5c6cd0e1c7895c622fb958d5cb4d89e01baa13d95a5081216023e1d7fc4bf7b4cdb71539f0d436d40cf277c3eb3e7ea397818ff38fac0718cc0d7482b06b61b8b5a6c81cbc895bab038b72bfd822aed99c85daf7eb9870f130d26f655bea2e29a60700197a628a45e59f45a03a32954b5b67b6bf5a42d3da7fb80ee20ffdExtension 1: not critical AuthorityKeyIdentifierKeyIdentifier: 57:71:8E:26:B1:5D:87:4F:77:9A:4D:0D:58:EF:F5:5B:8B:5D:D7:C7Extension 2: not critical EntrustVersInfoversion: V7.0 00001101Extension 3: not critical CRLDistributionPointsDistributionPoint: directoryName: cn=CRL1,ou=PKI7,o=Java Toolkit Samples,c=CAExtension 4: not critical BasicConstraintsCA: noExtension 5: not critical KeyUsagekeyEnciphermentExtension 6: not critical SubjectKeyIdentifier04:67:03:52:FA:FE:AD:1B:32:DE:58:45:84:A2:47:A0:DB:D2:9A:94Certificate Fingerprint: 08:60:50:37:A0:60:F1:B3:00:01:7F:57:69:4C:13:4BVersion: 3Serial number: 1064926583Signature algorithm: sha1WithRSAEncryptionIssuer: ou=PKI7,o=Java Toolkit Samples,c=CAValid not before: Wed Oct 01 10:52:20 EDT 2003 not after: Wed Oct 01 11:22:20 EDT 2008Subject: cn=RSA User1,ou=PKI7,o=Java Toolkit Samples,c=CApublic exponent: 10001modulus: b267ff25e83a54447a31b1c8048347bb8d9786bbac08c87a1c624b35d98e2f3c7db4f5be08291b8268001b8d56a6b5fcb845afa334eca7103cd5c5e563fb964f005a54a3ae3cdca1c452dffd1c9b3a31d38fdacf5ae503dfe0636570b7cc056f3f56de48abd59a259df3d51865a442a8018ac091adb6617ad046850ec228eb17Extension 1: not critical AuthorityKeyIdentifierKeyIdentifier: 57:71:8E:26:B1:5D:87:4F:77:9A:4D:0D:58:EF:F5:5B:8B:5D:D7:C7Extension 2: not critical EntrustVersInfoversion: V7.0 00001101Extension 3: not critical CRLDistributionPointsDistributionPoint: directoryName: cn=CRL1,ou=PKI7,o=Java Toolkit Samples,c=CAExtension 4: not critical BasicConstraintsCA: noExtension 5: not critical KeyUsagekeyEnciphermentExtension 6: not critical SubjectKeyIdentifier5F:EE:6E:7A:37:F4:53:BD:B8:2C:9D:44:75:BE:23:39:8D:31:EB:52Certificate Fingerprint: 87:30:47:95:31:D7:E8:53:3D:25:47:FD:F9:B0:8F:C4sending plain message...sending plain message compressed...sending explicitly signed message...sending explicitly signed message compressed...sending implicitly signed message...sending implicitly signed message compressed...sending encrypted message [RC2/40]...sending encrypted message [RC2/40] compressed...sending encrypted message [RC2/64]...sending encrypted message [RC2/64] compressed...sending encrypted message [RC2/128]...sending encrypted message [RC2/128] compressed...sending encrypted message [TripleDES]...sending encrypted message [TripleDES] compressed...sending implicitly signed and encrypted message [RC2/40]...sending implicitly signed and encrypted message [RC2/40] compressed...sending explicitly signed and encrypted message [RC2/40]...sending explicitly signed and encrypted message [RC2/40] compressed...sending certs-only messagesending certs-only message compressed...sending message with certs-only partsending message with certs-only part compressed...sending application/pkcs10 message...sending application/pkcs10 message compressed...sending message with pkcs10 part...sending message with pkcs10 part compressed...sending compressed message... sending signed and compressed data with sample alg_null compressionsending signed and compressed data with zlib_compression compressionsending signed and compressed message using different wrapped example...sending signed and encrypted message using different wrapped example...sending signed and encrypted message using different wrapped example...sending signed, encrypted and compressed message using different wrapped example...sending encrypted, signed and compressed message using different wrapped example...sending compressed, encrypted, compressed, signed and compressed message using different wrapped example...OK!Hit the <RETURN> key.