Unverified Commit 07cf026c authored by kladko's avatar kladko

SKALE-3151-decrypt-storage-key

parent d65cea62
...@@ -272,10 +272,17 @@ void trustedSetSEK(int *errStatus, char *errString, uint8_t *encrypted_sek) { ...@@ -272,10 +272,17 @@ void trustedSetSEK(int *errStatus, char *errString, uint8_t *encrypted_sek) {
(const sgx_sealed_data_t *) encrypted_sek, NULL, 0, (const sgx_sealed_data_t *) encrypted_sek, NULL, 0,
(uint8_t *)aes_key_hex, &dec_len); (uint8_t *)aes_key_hex, &dec_len);
if (status == 0x3001) {
LOG_ERROR("Could not decrypt LevelDB storage! \n"
"If you upgraded sgxwallet software or if you are restoring from backup, please run sgxwallet with -b flag and "
"pass your backup key.");
}
CHECK_STATUS2("sgx unseal SEK failed with status %d"); CHECK_STATUS2("sgx unseal SEK failed with status %d");
uint64_t len; uint64_t len;
hex2carray(aes_key_hex, &len, (uint8_t *) AES_key); hex2carray(aes_key_hex, &len, (uint8_t *) AES_key);
SET_SUCCESS SET_SUCCESS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment