pse_op.edl 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * Copyright (C) 2011-2017 Intel Corporation. All rights reserved.
  3. *
  4. * Redistribution and use in source and binary forms, with or without
  5. * modification, are permitted provided that the following conditions
  6. * are met:
  7. *
  8. * * Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * * Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in
  12. * the documentation and/or other materials provided with the
  13. * distribution.
  14. * * Neither the name of Intel Corporation nor the names of its
  15. * contributors may be used to endorse or promote products derived
  16. * from this software without specific prior written permission.
  17. *
  18. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  19. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  20. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  21. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  22. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  23. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  24. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  25. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  26. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  27. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  28. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  29. *
  30. */
  31. enclave{
  32. include "monotonic_counter_database_types.h"
  33. include "pse_types.h"
  34. include "sgx_dh.h"
  35. include "t_pairing_blob.h"
  36. trusted {
  37. public ae_error_t create_session_wrapper(uint64_t tick,
  38. [out] uint32_t *id,
  39. [out] pse_dh_msg1_t *dh_msg1);
  40. public ae_error_t exchange_report_wrapper(uint64_t tick,
  41. uint32_t sid,
  42. [in] sgx_dh_msg2_t *dh_msg2,
  43. [out] pse_dh_msg3_t *dh_msg3);
  44. public ae_error_t close_session_wrapper(uint32_t sid);
  45. public ae_error_t invoke_service_wrapper(uint64_t tick,
  46. [size = req_msg_size, in] uint8_t *req_msg,
  47. uint32_t req_msg_size,
  48. [size = resp_msg_size, out] uint8_t *resp_msg,
  49. uint32_t resp_msg_size);
  50. public ae_error_t initialize_sqlite_database_file_wrapper(bool is_for_empty_db_creation);
  51. public ae_error_t ephemeral_session_m2m3_wrapper([in] pairing_blob_t* sealed_blob,
  52. [in] pse_cse_msg2_t* pse_cse_msg2,
  53. [out] pse_cse_msg3_t* pse_cse_msg3);
  54. public ae_error_t ephemeral_session_m4_wrapper([in] pse_cse_msg4_t* pse_cse_msg4);
  55. };
  56. untrusted {
  57. pse_op_error_t sqlite_db_init_hash_tree_table();
  58. pse_op_error_t sqlite_read_db(uint32_t leaf_id,
  59. [out] pse_vmc_hash_tree_cache_t* cache);
  60. pse_op_error_t sqlite_write_db([in] pse_vmc_hash_tree_cache_t* cache,
  61. uint8_t is_for_update_flag,
  62. [in]op_leafnode_flag_t* op_flag_info);
  63. pse_op_error_t sqlite_read_children_of_root([out]pse_vmc_children_of_root_t* children);
  64. pse_op_error_t sqlite_get_empty_leafnode(
  65. [out] int* leaf_node_id,
  66. [in] sgx_measurement_t* mr_signer);
  67. ae_error_t psda_invoke_service_ocall([size = psda_req_msg_size, in] uint8_t* psda_req_msg,
  68. uint32_t psda_req_msg_size,
  69. [size = psda_resp_msg_size, out] uint8_t* psda_resp_msg,
  70. uint32_t psda_resp_msg_size);
  71. pse_op_error_t sqlite_rollback_db_file();
  72. };
  73. };