abstract byte[] sendMail(byte[] encryptedMailBytes)

Send the encrypted mail bytes to the host for delivery to the enclave. This method must block until the enclave processes the mail. If the enclave produces a synchronous response mail then that is returned back here.

If the enclave is unable to decrypt the mail bytes then the host must indicate so and this method must throw a MailDecryptionException. The client will catch this and attempt redelivery of the original message by using a fresh new copy of the EnclaveInstanceInfo from the host.

If the enclave itself threw an exception then this method must throw an EnclaveException. The message or may not contain the original message.


The synchronous mail response from the enclave, or null if there wasn't one.



The mail bytes to send to the host for delivery to the enclave.


If the enclave was unable to decrypt the mail bytes.

If the enclave threw an exception. contain the original message thrown by the enclave. In particular,

If there's an I/O error or some other issue with the sending or receiving.