Unverified Commit 8c1e32eb authored by kladko's avatar kladko

SKALE-3159-test-fails

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