Systemsicherheit/7-SGX_Hands-on/src/app/util.h
Paul Zinselmeyer a9d894a97d
Some checks failed
Latex Build / build-latex (Assignment 4 - Protokollsicherheit (Praxis)) (push) Successful in 1m2s
Latex Build / build-latex (Assignment 5 - Software Security - Teil 1) (push) Successful in 1m2s
Latex Build / build-latex (Assignment 6 - Software Security - Teil 2) (push) Has been cancelled
Latex Build / build-latex (Assignment 4 - Protokollsicherheit (Praxis)) (pull_request) Successful in 30s
Latex Build / build-latex (Assignment 5 - Software Security - Teil 1) (pull_request) Successful in 8s
Latex Build / build-latex (Assignment 6 - Software Security - Teil 2) (pull_request) Successful in 35s
[Assignment-7] app restructure and cleanup
2024-07-06 17:25:34 +02:00

33 lines
714 B
C

#ifndef _APP_UTIL_H_
#define _APP_UTIL_H_
#include <sgx_urts.h>
/*
* @brief prints the command syntax and exits with EXIT_FAILURE
*/
void syntax_exit(void);
void set_bin_name(char* bin_name);
void sgx_print_error_message(sgx_status_t ret);
int initialize_enclave(char* token_path);
sgx_enclave_id_t get_global_eid(void);
/*
* @brief loads a file completely into the HEAP
*
* Loads a File into HEAP and returns a dynamically allocated buffer.
*
* @param path path of the file
* @param data allocated buffer output
* @param data_len length of the allocated buffer
* @returns 0 on success, non zero on error
*/
int load_file(const char* path, uint8_t** data, size_t* data_len);
#endif