Running SMimeShow

The SMimeShow sample application retrieves and displays messages from a POP mail server.

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.smime.SMimeShow

Parameter

Value

<jakarta.mail.jar>

<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>jakarta.mail</artifactId>
<version>2.0.1</version>
</dependency>

<jakarta.activation.jar>

<dependency>
<groupId>com.sun.activation</groupId>
<artifactId>jakarta.activation</artifactId>
<version>2.0.1</version>
</dependency>

<other-mail-providers>

<dependency>
<groupId>org.eclipse.angus</groupId>
<artifactId>angus-mail</artifactId>
<version>2.0.3</version>
</dependency>
<dependency>
<groupId>org.eclipse.angus</groupId>
<artifactId>angus-activation</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>org.eclipse.angus</groupId>
<artifactId>pop3</artifactId>
<version>2.0.3</version>
</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.smime.SMimeShow
 
Total messages = 10
New messages = 0
-------------------------------
--------------------------
MESSAGE #1:
This is the message envelope
---------------------------
FROM: RSAUser1@javatkexamples.entrust.com
TO: RSAUser2@javatkexamples.entrust.com
SUBJECT: IAIK-S/MIME: Plain
SendDate: Mon Oct 06 11:40:25 EDT 2003
Size: 10874
FLAGS =
X-Mailer NOT available
CONTENT-TYPE: multipart/mixed; boundary="----=_Part_0_1770722.1065454823578"
----------------> Content is a Multipart
----------------> Multipart: 1
CONTENT-TYPE: text/plain; charset=us-ascii
Content is a String
---------------------------
This is a Test of the IAIK S/MIME implementation!
 
 
----------------> Multipart: 2
CONTENT-TYPE: application/octet-stream; name=index.html
Content is just an input stream: com.sun.mail.util.BASE64DecoderStream@4f459c
---------------------------
Length of data: 7651 bytes
----------------> End of Multipart
--------------------------
MESSAGE #2:
This is the message envelope
---------------------------
FROM: RSAUser1@javatkexamples.entrust.com
TO: RSAUser2@javatkexamples.entrust.com
SUBJECT: IAIK-S/MIME: Implicitly Signed
SendDate: Mon Oct 06 11:40:57 EDT 2003
Size: 18364
FLAGS =
X-Mailer NOT available
CONTENT-TYPE: application/x-pkcs7-mime; name=smime.p7m
Content is just an input stream: com.sun.mail.util.BASE64DecoderStream@633e5e
---------------------------
Length of data: 13418 bytes
--------------------------
MESSAGE #3:
This is the message envelope
---------------------------
FROM: RSAUser1@javatkexamples.entrust.com
TO: RSAUser2@javatkexamples.entrust.com
SUBJECT: IAIK-S/MIME: Encrypted [RC2-CBC/40]
SendDate: Mon Oct 06 11:41:05 EDT 2003
Size: 904
FLAGS =
X-Mailer NOT available
CONTENT-TYPE: application/x-pkcs7-mime; name=smime.p7m
Content is just an input stream: com.sun.mail.util.BASE64DecoderStream@13c0cf
---------------------------
Length of data: 658 bytes
--------------------------
MESSAGE #4:
This is the message envelope
---------------------------
FROM: RSAUser1@javatkexamples.entrust.com
TO: RSAUser2@javatkexamples.entrust.com
SUBJECT: IAIK-S/MIME: Encrypted [RC2-CBC/64]
SendDate: Mon Oct 06 11:41:10 EDT 2003
Size: 900
FLAGS =
X-Mailer NOT available
CONTENT-TYPE: application/x-pkcs7-mime; name=smime.p7m
Content is just an input stream: com.sun.mail.util.BASE64DecoderStream@576e70
---------------------------
Length of data: 657 bytes
--------------------------
MESSAGE #5:
This is the message envelope
---------------------------
FROM: RSAUser1@javatkexamples.entrust.com
TO: RSAUser2@javatkexamples.entrust.com
SUBJECT: IAIK-S/MIME: Encrypted [RC2-CBC/128]
SendDate: Mon Oct 06 11:41:15 EDT 2003
Size: 900
FLAGS =
X-Mailer NOT available
CONTENT-TYPE: application/x-pkcs7-mime; name=smime.p7m
Content is just an input stream: com.sun.mail.util.BASE64DecoderStream@1381e7
---------------------------
Length of data: 657 bytes
--------------------------
MESSAGE #6:
This is the message envelope
---------------------------
FROM: RSAUser1@javatkexamples.entrust.com
TO: RSAUser2@javatkexamples.entrust.com
SUBJECT: IAIK-S/MIME: Encrypted [DES-CBC]
SendDate: Mon Oct 06 11:41:28 EDT 2003
Size: 892
FLAGS =
X-Mailer NOT available
CONTENT-TYPE: application/x-pkcs7-mime; name=smime.p7m
Content is just an input stream: com.sun.mail.util.BASE64DecoderStream@35998f
---------------------------
Length of data: 649 bytes
--------------------------
MESSAGE #7:
This is the message envelope
---------------------------
FROM: RSAUser1@javatkexamples.entrust.com
TO: RSAUser2@javatkexamples.entrust.com
SUBJECT: IAIK-S/MIME: Encrypted [DES-EDE3-CBC]
SendDate: Mon Oct 06 11:41:33 EDT 2003
Size: 904
FLAGS =
X-Mailer NOT available
CONTENT-TYPE: application/x-pkcs7-mime; name=smime.p7m
Content is just an input stream: com.sun.mail.util.BASE64DecoderStream@7494c8
---------------------------
Length of data: 660 bytes
--------------------------
MESSAGE #8:
This is the message envelope
---------------------------
FROM: RSAUser1@javatkexamples.entrust.com
TO: RSAUser2@javatkexamples.entrust.com
SUBJECT: IAIK-S/MIME: Implicitly Signed and Encrypted
SendDate: Mon Oct 06 11:41:38 EDT 2003
Size: 26106
FLAGS =
X-Mailer NOT available
CONTENT-TYPE: application/x-pkcs7-mime; name=smime.p7m
Content is just an input stream: com.sun.mail.util.BASE64DecoderStream@53db51
---------------------------
Length of data: 19077 bytes
--------------------------
MESSAGE #9:
This is the message envelope
---------------------------
FROM: RSAUser1@javatkexamples.entrust.com
TO: RSAUser2@javatkexamples.entrust.com
SUBJECT: IAIK-S/MIME: Certificate Request
SendDate: Mon Oct 06 11:41:43 EDT 2003
Size: 538
FLAGS =
X-Mailer NOT available
CONTENT-TYPE: application/x-pkcs10; name=smime.p10
Content is just an input stream: com.sun.mail.util.BASE64DecoderStream@63c624
---------------------------
Length of data: 393 bytes
--------------------------
MESSAGE #10:
This is the message envelope
---------------------------
FROM: RSAUser1@javatkexamples.entrust.com
TO: RSAUser2@javatkexamples.entrust.com
SUBJECT: IAIK-S/MIME: Certificate Request
SendDate: Mon Oct 06 11:41:49 EDT 2003
Size: 953
FLAGS =
X-Mailer NOT available
CONTENT-TYPE: multipart/mixed; boundary="----=_Part_3_7314318.1065454909203"
----------------> Content is a Multipart
----------------> Multipart: 1
CONTENT-TYPE: text/plain; charset=us-ascii
Content is a String
---------------------------
This is a test where the request message is included in the second part!
 
 
----------------> Multipart: 2
CONTENT-TYPE: application/pkcs10; name=smime.p10
Content is just an input stream: com.sun.mail.util.BASE64DecoderStream@657e8f
---------------------------
Length of data: 393 bytes
----------------> End of Multipart
Ready! Press the space bar...