If you want to sign and encrypt a message, you must use the special service, pub.smime.keystore:createSignedAndEncryptedData, that Integration Server provides for this purpose.
To use this service, you must provide the credentials for signing a message (the alias of the keystore and the signing key) and the credentials needed to encrypt a message (the recipient’s certificate). For information about obtaining these credentials, see
Signing a MIME Message and
Encrypting a MIME Message.