Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dump attested TLS credentials upon starting up #108

Draft
wants to merge 1 commit into
base: oe_port
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/enclave/enclave_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "enclave/sgxlkl_config.h"
#include "enclave/wireguard.h"
#include "enclave/wireguard_util.h"
#include "enclave/gencreds.h"
#include "shared/env.h"

_Atomic(enum sgxlkl_libc_state) __libc_state = libc_not_started;
Expand Down Expand Up @@ -170,6 +171,13 @@ static int startmain(void* args)
// Mount disks
lkl_mount_disks(app_config.disks, app_config.num_disks, app_config.cwd);

/* Generate the attested credential files under the /run directory */
if (sgxlkl_generate_attested_credentials() != 0)
{
sgxlkl_fail("Failed to generate attested credential files: %s: %s\n",
SGXLKL_ATTESTED_CERT_PATH, SGXLKL_ATTESTED_PRIVATE_KEY_PATH);
}

// Add Wireguard peers
if (wg_dev)
{
Expand Down