Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions func/demo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ demo_func(string string.cpp)
demo_func(sysconf sysconf.cpp)
demo_func(time time.cpp)
demo_func(time_of_day time_of_day.cpp)
demo_func(tless tless.cpp)
demo_func(uname uname.cpp)
demo_func(va_arg va_arg.cpp)
demo_func(waitpid waitpid.cpp)
Expand Down
22 changes: 22 additions & 0 deletions func/demo/tless.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include <cstdint>
#include <iostream>
#include <string>

extern "C" {
void __tless_get_attestation_jwt(char** jwtPtrPtr, int32_t* jwtPtrSize);
}

int main()
{
char* jwt;
int32_t jwtSize;

// JWT is heap-allocated
__tless_get_attestation_jwt(&jwt, &jwtSize);

std::string jwtStr(jwt);

std::cout << "JWT: " << jwtStr << std::endl;

return 0;
}
3 changes: 3 additions & 0 deletions libfaasm/libfaasm.imports
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@ __faasm_s3_get_key_bytes

# Test
__faasm_host_interface_test

# TLess TODO consider!
__tless_get_attestation_jwt