Integration Server 10.15 | MIME-S/MIME Developer’s Guide | Building MIME and S/MIME Messages | Signing a MIME Message | How to Create a Signed S/MIME Message
 
How to Create a Signed S/MIME Message
The following procedure describes the general steps you take to create a signed S/MIME message.
Important:
If you want to create a signed and encrypted MIME message, use the special service that Integration Server provides for this purpose. For more information, see Signing and Encrypting a MIME Message.
Important:
You can sign only those messages that are within the threshold value specified by the watt.server.mime.largeDataThreshold configuration parameter.
Before you begin, you must have a keystore alias and a password for at least one key alias. The credentials provided by the keystore alias and the key alias are used to sign the message. If you cannot locate these credentials or do not have direct access to them, consult your Integration Server Administrator.
1. Create an InputStream that contains the MIME message that you want to sign. Use the procedure outlined in How to Create a MIME Message to create the MIME message.
2. Pass your signing credentials to the pub.smime.keystore:createSignedData service. This service takes an InputStream containing a MIME message and signs it using the private key and the certificates pointed by the keystore alias and key alias that you provide. It produces an InputStream containing the signed message.