Skip to content

Commit

Permalink
fixup! [LibOS] Support special keys (MRENCLAVE, MRSIGNER) in `encrypt…
Browse files Browse the repository at this point in the history
…ed` fs

Signed-off-by: Paweł Marczewski <[email protected]>
  • Loading branch information
pwmarcz committed Apr 21, 2022
1 parent d574e3b commit b356abf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions LibOS/shim/src/fs/shim_fs_encrypted.c
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ int get_or_create_encrypted_files_key(const char* name, struct shim_encrypted_fi
memcpy(&key->pf_key, &pf_key, sizeof(pf_key));
key->is_set = true;
} else if (ret == -PAL_ERROR_NOTIMPLEMENTED) {
log_warning("Special key \"%s\" is not supported by current PAL. Mounts using this key "
"will not work.", name);
log_debug("Special key \"%s\" is not supported by current PAL. Mounts using this key "
"will not work.", name);
/* proceed without setting value */
} else {
log_debug("DkGetSpecialKey(\"%s\") failed: %d", name, ret);
Expand Down
2 changes: 1 addition & 1 deletion Pal/src/host/Linux-SGX/db_misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -629,7 +629,7 @@ int _DkSetProtectedFilesKey(const char* pf_key_hex) {
int _DkGetSpecialKey(const char* name, void* key, size_t* key_size) {
sgx_key_128bit_t sgx_key;

if (*key_size < sizeof(key))
if (*key_size < sizeof(sgx_key))
return -PAL_ERROR_INVAL;

int ret;
Expand Down

0 comments on commit b356abf

Please sign in to comment.