#[no_mangle]
pub unsafe extern "C" fn teaclave_connect_frontend_service(
address: *const c_char,
enclave_info_path: *const c_char,
as_root_ca_cert_path: *const c_char
) -> *mut FrontendClient
Expand description
Connect to Teaclave Frontend Service.
This function connects and establishes trusted channel to the remote
frontend service with address
. The function gets enclave info from
the file located in enclave_info_path
. The file in as_root_ca_cert_path
will be used to verify the attestation report from the remote service.
Arguments
address
: address of remote services, normally,it’s a domain name with port number.enclave_info_path
: file path of the enclave info TOML file.as_root_ca_cert_path
: file path of the certificate for remote attestation service.
Return
- The function returns an opaque pointer (handle) of the service. On error, the function returns NULL.
Safety
All arguments should be C string (null terminated).