Unverified Commit 8c1e32eb authored by kladko's avatar kladko

SKALE-3159-test-fails

parent be8e7426
......@@ -234,7 +234,7 @@ void enter_SEK() {
void initSEK() {
std::shared_ptr<std::string> encr_SEK_ptr = LevelDB::getLevelDb()->readString("SEK");
if (encryptKeys) {
if (enterBackupKey) {
enter_SEK();
} else {
if (encr_SEK_ptr == nullptr) {
......
......@@ -48,7 +48,7 @@
int printDebugInfo = -1;
int useHTTPS = -1;
int encryptKeys = -1;
int enterBackupKey = -1;
int autoconfirm = -1;
shared_ptr <SGXRegistrationServer> SGXRegistrationServer::server = nullptr;
......
......@@ -54,7 +54,7 @@
using namespace std;
void setFullOptions(uint64_t _logLevel, int _useHTTPS, int _autoconfirm, int _encryptKeys) {
void setFullOptions(uint64_t _logLevel, int _useHTTPS, int _autoconfirm, int _enterBackupKey) {
CHECK_STATE(_logLevel <= 2)
......@@ -70,8 +70,8 @@ void setFullOptions(uint64_t _logLevel, int _useHTTPS, int _autoconfirm, int _en
spdlog::info("useHTTPS set to " + to_string(_useHTTPS));
autoconfirm = _autoconfirm;
spdlog::info("autoconfirm set to " + to_string(autoconfirm));
encryptKeys = _encryptKeys;
spdlog::info("encryptKeys set to " + to_string(encryptKeys));
enterBackupKey = _enterBackupKey;
spdlog::info("enterBackupKey set to " + to_string(enterBackupKey));
}
void setOptions(uint64_t _logLevel, int _useHTTPS, int _autoconfirm) {
......
......@@ -30,7 +30,7 @@
#define EXTERNC
#endif
EXTERNC void setFullOptions(uint64_t _logLevel, int _useHTTPS, int _autoconfirm, int _encryptKeys);
EXTERNC void setFullOptions(uint64_t _logLevel, int _useHTTPS, int _autoconfirm, int _enterBackupKey);
EXTERNC void setOptions(uint64_t _logLevel, int _useHTTPS, int _autoconfirm);
......
......@@ -44,16 +44,17 @@ void SGXWallet::usage() {
}
void SGXWallet::printUsage() {
cerr << "Available flags:\n";
cerr << "-c Do not verify client certificate\n";
cerr << "-s Sign client certificate without human confirmation \n";
cerr << "-d Turn on debug output\n";
cerr << "-v Verbose mode: turn on debug output\n";
cerr << "-vv Detailed verbose mode: turn on debug and trace outputs\n";
cerr << "-n Launch SGXWalletServer using http (not https)\n";
cerr << "-b Restore from back up (you will need to enter backup key) \n";
cerr << "-y Do not ask user to acknowledge receipt of backup key \n";
cerr << "-T Generate test keys \n";
cerr << "\nAvailable flags:\n";
cerr << "\nDebug flags:\n\n";
cerr << " -v Verbose mode: turn on debug output\n";
cerr << " -vv Detailed verbose mode: turn on debug and trace outputs\n";
cerr << "\nBackup, restore, update flags:\n\n";
cerr << " -b Restore from back up or software update. You will need to type in the backup key. \n";
cerr << " -y Do not ask user to acknowledge receipt of the backup key \n";
cerr << "\nHTTPS flags:\n\n";
cerr << " -n Launch sgxwallet using http. Default is to use https with a selg-signed server cert. \n";
cerr << " -c Do not verify SSL client certs\n";
cerr << " -s Sign SSL client certs without human confirmation \n";
}
......@@ -87,7 +88,7 @@ void SGXWallet::serializeKeys(const vector<string>& _ecdsaKeyNames, const vector
int main(int argc, char *argv[]) {
bool encryptKeysOption = false;
bool enterBackupKeyOption = false;
bool useHTTPSOption = true;
bool printDebugInfoOption = false;
bool printTraceInfoOption = false;
......@@ -131,10 +132,10 @@ int main(int argc, char *argv[]) {
useHTTPSOption = false;
break;
case 'a':
encryptKeysOption = false;
enterBackupKeyOption = false;
break;
case 'b':
encryptKeysOption = true;
enterBackupKeyOption = true;
break;
case 'y':
autoconfirmOption = true;
......@@ -159,7 +160,7 @@ int main(int argc, char *argv[]) {
logLevel = L_TRACE;
}
setFullOptions(logLevel, useHTTPSOption, autoconfirmOption, encryptKeysOption);
setFullOptions(logLevel, useHTTPSOption, autoconfirmOption, enterBackupKeyOption);
uint32_t enclaveLogLevel = L_INFO;
......
......@@ -45,7 +45,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdbool.h>
extern int useHTTPS;
extern int encryptKeys;
extern int enterBackupKey;
extern int autoconfirm;
#define BUF_LEN 4096
......
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