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
df089ab5
Unverified
Commit
df089ab5
authored
Mar 29, 2021
by
Stan Kladko
Committed by
GitHub
Mar 29, 2021
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #287 from skalenetwork/bug/SKALE-4037-clean-sgx-error-processing
SKALE 4037 clean sgx error processing
parents
19bf094b
41fc3369
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
14 additions
and
10 deletions
+14
-10
ServerWorker.cpp
ServerWorker.cpp
+1
-1
ZMQServer.cpp
ZMQServer.cpp
+4
-5
sgxwall.cpp
sgxwall.cpp
+4
-4
sgxwallet_common.h
sgxwallet_common.h
+5
-0
No files found.
ServerWorker.cpp
View file @
df089ab5
...
...
@@ -113,7 +113,7 @@ void ServerWorker::doOneServerLoop() noexcept {
}
catch
(
SGXException
&
e
)
{
result
[
"status"
]
=
e
.
getStatus
();
result
[
"errorMessage"
]
=
e
.
getMessage
();
result
[
"errorMessage"
]
=
e
.
what
();
spdlog
::
error
(
"Exception in zmq server worker:{}"
,
e
.
what
());
}
catch
(
std
::
exception
&
e
)
{
...
...
ZMQServer.cpp
View file @
df089ab5
...
...
@@ -78,7 +78,7 @@ void ZMQServer::run() {
frontend
->
bind
(
"tcp://*:"
+
to_string
(
port
));
}
catch
(...)
{
spdlog
::
error
(
"Server task could not bind to port:{}"
,
port
);
exit
(
-
100
);
exit
(
ZMQ_COULD_NOT_BIND_FRONT_END
);
}
spdlog
::
info
(
"Bound port ..."
);
...
...
@@ -88,7 +88,7 @@ void ZMQServer::run() {
backend
->
bind
(
"inproc://backend"
);
}
catch
(
exception
&
e
)
{
spdlog
::
error
(
"Could not bind to zmq backend: {}"
,
e
.
what
());
exit
(
-
101
);
exit
(
ZMQ_COULD_NOT_BIND_BACK_END
);
}
...
...
@@ -103,7 +103,7 @@ void ZMQServer::run() {
}
}
catch
(
std
::
exception
&
e
)
{
spdlog
::
error
(
"Could not create zmq server workers:{} "
,
e
.
what
());
exit
(
-
102
);
exit
(
ZMQ_COULD_NOT_CREATE_WORKERS
);
};
...
...
@@ -123,7 +123,7 @@ void ZMQServer::run() {
return
;
}
spdlog
::
info
(
"Error, exiting zmq server ..."
);
return
;
exit
(
ZMQ_COULD_NOT_CREATE_PROXY
)
;
}
}
...
...
@@ -152,7 +152,6 @@ void ZMQServer::exitZMQServer() {
zmqServer
->
exitAll
();
spdlog
::
info
(
"deleting zmq server"
);
zmqServer
=
nullptr
;
spdlog
::
info
(
"deleted zmq server "
);
...
...
sgxwall.cpp
View file @
df089ab5
...
...
@@ -54,10 +54,10 @@ void SGXWallet::printUsage() {
cerr
<<
"
\n
Backup, restore, update flags:
\n\n
"
;
cerr
<<
" -b filename Restore from back up or software update. You will need to put backup key into a file in sgx_data dir.
\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 D
o not verify SSL client certs
\n
"
;
cerr
<<
" -s Sign
SSL client certs without human confirmation
\n
"
;
cerr
<<
"
\n
Security flags
flags:
\n\n
"
;
cerr
<<
" -n
Use http instead of https. Default is to use https with a selg-signed server cert. Insecure!
\n
"
;
cerr
<<
" -c D
isable client authentication using certificates. Insecure!
\n
"
;
cerr
<<
" -s Sign
client certificates without human confirmation. Insecure!
\n
"
;
}
...
...
sgxwallet_common.h
View file @
df089ab5
...
...
@@ -168,6 +168,11 @@ extern bool autoconfirm;
#define ZMQ_NO_SIG_IN_MESSAGE -95
#define ZMQ_NO_CERT_IN_MESSAGE -96
#define ZMQ_COULD_NOT_VERIFY_SIG -97
#define ZMQ_COULD_NOT_BIND_FRONT_END -98
#define ZMQ_COULD_NOT_BIND_BACK_END -99
#define ZMQ_COULD_NOT_CREATE_WORKERS -100
#define ZMQ_COULD_NOT_CREATE_PROXY -101
#define SGX_ENCLAVE_ERROR -666
...
...
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