sign
Description:
Attempts to sign the entity MIME part with userid's private key using S/MIME.
If successful, a new application/pkcs7-mime object is returned.
Parameters:
| entity | 
           a Object  | 
      
| userid | 
           the user id to sign with  | 
      
Returns:
| 
           a new ApplicationPkcs7Mime object on success or 
            null on fail. If signing fails, an exception will be set on   |