Skip to content

Commit

Permalink
Minor changes to secret_store.c to allow for easier unit testing
Browse files Browse the repository at this point in the history
- Removed unneeded include
- Removed redundant check for blob_size
  • Loading branch information
italo-sampaio committed Oct 8, 2024
1 parent c8cd19c commit 1adf629
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions firmware/src/hal/sgx/src/trusted/secret_store.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include <string.h>
#include <stdlib.h>

#include <openenclave/enclave.h>
#include <openenclave/corelibc/stdlib.h>
#include <openenclave/seal.h>
#include <sys/mount.h>
Expand Down Expand Up @@ -75,11 +74,6 @@ static uint8_t unseal_data(const sealed_secret_t* sealed_secret,
uint8_t* dest,
size_t dest_length) {
#ifndef SIM_BUILD
if (sealed_secret->blob_size > MAX_BLOB_SIZE) {
LOG("Sealed blob size is too large\n");
goto unseal_data_error;
}

uint8_t* plaintext = NULL;
size_t plaintext_size = 0;
oe_result_t result = oe_unseal(sealed_secret->blob,
Expand Down

0 comments on commit 1adf629

Please sign in to comment.