Skip to content

Commit

Permalink
ocall_mocks: added new ocall_* methods
Browse files Browse the repository at this point in the history
  • Loading branch information
valdok committed Mar 4, 2024
1 parent f3ce601 commit c539047
Showing 1 changed file with 55 additions and 4 deletions.
59 changes: 55 additions & 4 deletions cosmwasm/enclaves/test/src/ocall_mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ pub extern "C" fn ocall_get_update_info(
platform_blob: *const sgx_platform_info_t,
enclave_trusted: i32,
update_info: *mut sgx_update_info_bit_t,
) -> sgx_status_t {
) -> sgx_status_t {
unimplemented!()
}

Expand All @@ -46,7 +46,7 @@ pub extern "C" fn ocall_get_quote(
p_quote: *mut u8,
_maxlen: u32,
p_quote_len: *mut u32,
) -> sgx_status_t {
) -> sgx_status_t {
unimplemented!()
}

Expand All @@ -56,11 +56,11 @@ pub extern "C" fn ocall_get_sn_tss_socket(_ret_fd: *mut c_int) -> sgx_status_t {
}

#[no_mangle]
pub extern "C" fn ocall_get_ias_socket(ret_fd: *mut c_int) -> sgx_status_t {
pub extern "C" fn ocall_get_ias_socket(ret_fd: *mut c_int) -> sgx_status_t {
unimplemented!()
}

pub fn lookup_ipv4(host: &str, port: u16) -> SocketAddr {
pub fn lookup_ipv4(host: &str, port: u16) -> SocketAddr {
unimplemented!()
}

Expand Down Expand Up @@ -137,3 +137,54 @@ pub extern "C" fn ocall_read_db(
pub extern "C" fn ocall_allocate(_buffer: *const u8, _length: usize) -> UserSpaceBuffer {
unimplemented!()
}

#[no_mangle]
pub extern "C" fn ocall_get_quote_ecdsa_params(
ret_val: *mut sgx_status_t,
pQeInfo: *mut sgx_target_info_t,
pQuoteSize: *mut u32,
) -> sgx_status_t {
unimplemented!()
}

#[no_mangle]
pub extern "C" fn ocall_get_quote_ecdsa(
ret_val: *mut sgx_status_t,
pReport: *const sgx_report_t,
pQuote: *mut u8,
nQuote: u32,
) -> sgx_status_t {
unimplemented!()
}

#[no_mangle]
pub extern "C" fn ocall_get_quote_ecdsa_collateral(
ret_val: *mut sgx_status_t,
pQuote: *const u8,
nQuote: u32,
pCol: *mut u8,
nCol: u32,
pColOut: *mut u32,
) -> sgx_status_t {
unimplemented!()
}

#[no_mangle]
pub extern "C" fn ocall_verify_quote_ecdsa(
ret_val: *mut sgx_status_t,
pQuote: *const u8,
nQuote: u32,
pCol: *const u8,
nCol: u32,
pTargetInfo: *const sgx_target_info_t,
nTime: i64,
p_qve_report_info: *mut sgx_ql_qe_report_info_t,
pSuppData: *mut u8,
nSuppData: u32,
pSuppDataActual: *mut u32,
pTime: *mut i64,
pCollateral_expiration_status: *mut u32,
pQvResult: *mut sgx_ql_qv_result_t,
) -> sgx_status_t {
unimplemented!()
}

0 comments on commit c539047

Please sign in to comment.