demo.smime.pkcs11
Class ExplicitSignedMailDemo
java.lang.Object
demo.cms.pkcs11.PKCS11Demo
demo.smime.pkcs11.SignedMailDemo
demo.smime.pkcs11.ExplicitSignedMailDemo
public class ExplicitSignedMailDemo
- extends SignedMailDemo
This class shows how to create a signed message (explicit signed,
the content data is included; content type multipart/signed) according
to S/MIME using the IAIK PKCS#11 provider for accessing the private key
on a smart card. This implementation uses the SecurityProvider
feature of the IAIK-CMS toolkit.
To run this demo the following packages are required:
iaik_cms.jar
, iaik_cms_demo.jar
, iaik_jce(full).jar
,
iaikPkcs11Wrapper.jar
and iaikPkcs11Provider.jar
(and
iaik_eccelerate.jar
, mail.jar
, activation.jar
) have to
be put into the classpath, the shared library (pkcs11wrapper.dll
or
libpkcs11wrapper.so
) has to be in your system library search path or in your VM
library path, e.g. (on Windows, assuming that all jar files are located in a lib sub-directory
and the dll is in a lib/win64 sub-directory):
java -Djava.library.path=lib/win64
-cp lib/iaik_jce.jar;lib/iaikPkcs11Wrapper.jar;lib/iaikPkcs11Provider.jar;lib/iaik_cms.jar;lib/iaik_cms_demo.jar;lib/mail.jar;lib/activation.jar
demo.pkcs11.ExplicitSignedMailDemo <pkcs11Module>.dll
Constructor Summary |
ExplicitSignedMailDemo(java.lang.String moduleName,
char[] userPin)
Creates a ExplicitSignedDataStreamDemo object for the given module name. |
Method Summary |
static void |
main(java.lang.String[] args)
This is the main method that is called by the JVM during startup. |
void |
start()
Starts the demo. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ExplicitSignedMailDemo
public ExplicitSignedMailDemo(java.lang.String moduleName,
char[] userPin)
- Creates a ExplicitSignedDataStreamDemo object for the given module name.
- Parameters:
moduleName
- the name of the moduleuserPin
- the user-pin (password) for the TokenKeyStore
(may be null
to pou-up a dialog asking for the pin)
start
public void start()
- Starts the demo.
main
public static void main(java.lang.String[] args)
- This is the main method that is called by the JVM during startup.
- Parameters:
args
- These are the command line arguments.
|
v6.1
(c) 2002
IAIK, (c) 2003 - 2025
SIC
|
|