Unverified Commit 685d6777 authored by kladko's avatar kladko

SKALE-3170-completed-backup-changes

parent c136929d
......@@ -39,7 +39,7 @@
using namespace std;
#define BACKUP_PATH "./sgx_data/backup_key.txt"
#define BACKUP_PATH "./sgx_data/sgxwallet_backup_key.txt"
bool case_insensitive_match(string s1, string s2) {
......@@ -214,6 +214,8 @@ void trustedSetSEK(shared_ptr <string> hex_encrypted_SEK) {
#include "experimental/filesystem"
#include <boost/algorithm/string.hpp>
void enter_SEK() {
vector<char> errMsg(BUF_LEN, 0);
......@@ -237,6 +239,8 @@ void enter_SEK() {
string sek((istreambuf_iterator<char>(sek_file)),
istreambuf_iterator<char>());
boost::trim(sek);
spdlog::info("Setting backup key ...");
while (!checkHex(sek, 16)) {
......
......@@ -95,6 +95,19 @@ public:
}
};
class TestFixtureNoResetFromBackup {
public:
TestFixtureNoResetFromBackup() {
setFullOptions(L_INFO, false, true, true );
initAll(L_INFO, false, true);
}
~TestFixtureNoResetFromBackup() {
TestUtils::destroyEnclave();
}
};
class TestFixtureNoReset {
public:
TestFixtureNoReset() {
......@@ -107,7 +120,6 @@ public:
}
};
TEST_CASE_METHOD(TestFixture, "ECDSA AES keygen and signature test", "[ecdsa-aes-key-sig-gen]") {
vector<char> errMsg(BUF_LEN, 0);
int errStatus = 0;
......@@ -721,3 +733,6 @@ TEST_CASE_METHOD(TestFixture, "First run", "[first-run]") {
TEST_CASE_METHOD(TestFixtureNoReset, "Second run", "[second-run]") {
}
TEST_CASE_METHOD(TestFixtureNoResetFromBackup, "Backup restore", "[backup-restore]") {
}
......@@ -29,7 +29,8 @@ username = getpass.getuser()
topDir = os.getcwd() + "/sgxwallet"
print("Top directory is:" + topDir)
testList = ["[first-run]",
"[second-run]",
"[second-run]",
"[backup-restore]",
"[cert-sign]",
"[get-server-status]",
"[get-server-version]",
......
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