Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
sgxwallet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董子豪
sgxwallet
Commits
8c1e32eb
Unverified
Commit
8c1e32eb
authored
Aug 25, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-3159-test-fails
parent
be8e7426
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
21 deletions
+22
-21
SEKManager.cpp
SEKManager.cpp
+1
-1
SGXRegistrationServer.cpp
SGXRegistrationServer.cpp
+1
-1
SGXWalletServer.cpp
SGXWalletServer.cpp
+3
-3
SGXWalletServer.h
SGXWalletServer.h
+1
-1
sgxwall.cpp
sgxwall.cpp
+15
-14
sgxwallet_common.h
sgxwallet_common.h
+1
-1
No files found.
SEKManager.cpp
View file @
8c1e32eb
...
...
@@ -234,7 +234,7 @@ void enter_SEK() {
void
initSEK
()
{
std
::
shared_ptr
<
std
::
string
>
encr_SEK_ptr
=
LevelDB
::
getLevelDb
()
->
readString
(
"SEK"
);
if
(
en
cryptKeys
)
{
if
(
en
terBackupKey
)
{
enter_SEK
();
}
else
{
if
(
encr_SEK_ptr
==
nullptr
)
{
...
...
SGXRegistrationServer.cpp
View file @
8c1e32eb
...
...
@@ -48,7 +48,7 @@
int
printDebugInfo
=
-
1
;
int
useHTTPS
=
-
1
;
int
en
cryptKeys
=
-
1
;
int
en
terBackupKey
=
-
1
;
int
autoconfirm
=
-
1
;
shared_ptr
<
SGXRegistrationServer
>
SGXRegistrationServer
::
server
=
nullptr
;
...
...
SGXWalletServer.cpp
View file @
8c1e32eb
...
...
@@ -54,7 +54,7 @@
using
namespace
std
;
void
setFullOptions
(
uint64_t
_logLevel
,
int
_useHTTPS
,
int
_autoconfirm
,
int
_en
cryptKeys
)
{
void
setFullOptions
(
uint64_t
_logLevel
,
int
_useHTTPS
,
int
_autoconfirm
,
int
_en
terBackupKey
)
{
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
));
en
cryptKeys
=
_encryptKeys
;
spdlog
::
info
(
"en
cryptKeys set to "
+
to_string
(
encryptKeys
));
en
terBackupKey
=
_enterBackupKey
;
spdlog
::
info
(
"en
terBackupKey set to "
+
to_string
(
enterBackupKey
));
}
void
setOptions
(
uint64_t
_logLevel
,
int
_useHTTPS
,
int
_autoconfirm
)
{
...
...
SGXWalletServer.h
View file @
8c1e32eb
...
...
@@ -30,7 +30,7 @@
#define EXTERNC
#endif
EXTERNC
void
setFullOptions
(
uint64_t
_logLevel
,
int
_useHTTPS
,
int
_autoconfirm
,
int
_en
cryptKeys
);
EXTERNC
void
setFullOptions
(
uint64_t
_logLevel
,
int
_useHTTPS
,
int
_autoconfirm
,
int
_en
terBackupKey
);
EXTERNC
void
setOptions
(
uint64_t
_logLevel
,
int
_useHTTPS
,
int
_autoconfirm
);
...
...
sgxwall.cpp
View file @
8c1e32eb
...
...
@@ -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
<<
"
\n
Available flags:
\n
"
;
cerr
<<
"
\n
Debug 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
<<
"
\n
Backup, 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
<<
"
\n
HTTPS 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
en
cryptKeys
Option
=
false
;
bool
en
terBackupKey
Option
=
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'
:
en
cryptKeys
Option
=
false
;
en
terBackupKey
Option
=
false
;
break
;
case
'b'
:
en
cryptKeys
Option
=
true
;
en
terBackupKey
Option
=
true
;
break
;
case
'y'
:
autoconfirmOption
=
true
;
...
...
@@ -159,7 +160,7 @@ int main(int argc, char *argv[]) {
logLevel
=
L_TRACE
;
}
setFullOptions
(
logLevel
,
useHTTPSOption
,
autoconfirmOption
,
en
cryptKeys
Option
);
setFullOptions
(
logLevel
,
useHTTPSOption
,
autoconfirmOption
,
en
terBackupKey
Option
);
uint32_t
enclaveLogLevel
=
L_INFO
;
...
...
sgxwallet_common.h
View file @
8c1e32eb
...
...
@@ -45,7 +45,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <stdbool.h>
extern
int
useHTTPS
;
extern
int
en
cryptKeys
;
extern
int
en
terBackupKey
;
extern
int
autoconfirm
;
#define BUF_LEN 4096
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment