IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1

demo.smime.basic
Class SMimeShowDemo

java.lang.Object
  extended by demo.smime.basic.SMimeShowDemo

public class SMimeShowDemo
extends java.lang.Object

This class demonstrates the usage of the IAIK S/MIME implementation for downloading and verifying/decrypting signed and/or encrypted emails from some mail server.

To run this demo the following packages are required:

Usage:
 SMimeShow [-L url] [-T protocol] [-H host] [-U user] [-P password] [-f mailbox] [msgnum] [-v]
 
Example to display message 2:
 SMimeShow -T imap -H mailhost -U test -P test -f INBOX 2
 

See Also:
EncryptedContent, SignedContent

Constructor Summary
SMimeShowDemo()
          Default constructor.
 
Method Summary
 void dump(java.lang.Object o)
          Dumps the given object (message).
static void dumpEnvelope(javax.mail.Message m)
          Prints the envelope of a message.
static void main(java.lang.String[] argv)
          Main method.
 void show(java.lang.String[] argv)
          Connects to the mail server, downloads messages, verifies/decrypts them (if they are signed/encrypted).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SMimeShowDemo

public SMimeShowDemo()
Default constructor. Reads certificates and keys from the demo keystore.

Method Detail

show

public void show(java.lang.String[] argv)
          throws java.io.IOException
Connects to the mail server, downloads messages, verifies/decrypts them (if they are signed/encrypted).

Parameters:
argv - optional parameters like mailhost, account name,...
Throws:
java.io.IOException - if an I/O related error occurs

dump

public void dump(java.lang.Object o)
          throws java.lang.Exception
Dumps the given object (message).

Parameters:
o - the object (message) to be dumped
Throws:
java.lang.Exception - if some error occurs

dumpEnvelope

public static void dumpEnvelope(javax.mail.Message m)
                         throws javax.mail.MessagingException
Prints the envelope of a message.

Parameters:
m - the message
Throws:
javax.mail.MessagingException - if an error occurs

main

public static void main(java.lang.String[] argv)
                 throws java.lang.Exception
Main method.

Throws:
java.lang.Exception

IAIK CMS/SMIME Toolkit Demo API Documentation
Version 6.1

v6.1
(c) 2002 IAIK, (c) 2003 - 2025 SIC