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
41fc3369
Unverified
Commit
41fc3369
authored
Mar 29, 2021
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE 4037 clean sgx error processing
parent
19bf094b
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 @
41fc3369
...
@@ -113,7 +113,7 @@ void ServerWorker::doOneServerLoop() noexcept {
...
@@ -113,7 +113,7 @@ void ServerWorker::doOneServerLoop() noexcept {
}
catch
(
SGXException
&
e
)
{
}
catch
(
SGXException
&
e
)
{
result
[
"status"
]
=
e
.
getStatus
();
result
[
"status"
]
=
e
.
getStatus
();
result
[
"errorMessage"
]
=
e
.
getMessage
();
result
[
"errorMessage"
]
=
e
.
what
();
spdlog
::
error
(
"Exception in zmq server worker:{}"
,
e
.
what
());
spdlog
::
error
(
"Exception in zmq server worker:{}"
,
e
.
what
());
}
}
catch
(
std
::
exception
&
e
)
{
catch
(
std
::
exception
&
e
)
{
...
...
ZMQServer.cpp
View file @
41fc3369
...
@@ -78,7 +78,7 @@ void ZMQServer::run() {
...
@@ -78,7 +78,7 @@ void ZMQServer::run() {
frontend
->
bind
(
"tcp://*:"
+
to_string
(
port
));
frontend
->
bind
(
"tcp://*:"
+
to_string
(
port
));
}
catch
(...)
{
}
catch
(...)
{
spdlog
::
error
(
"Server task could not bind to port:{}"
,
port
);
spdlog
::
error
(
"Server task could not bind to port:{}"
,
port
);
exit
(
-
100
);
exit
(
ZMQ_COULD_NOT_BIND_FRONT_END
);
}
}
spdlog
::
info
(
"Bound port ..."
);
spdlog
::
info
(
"Bound port ..."
);
...
@@ -88,7 +88,7 @@ void ZMQServer::run() {
...
@@ -88,7 +88,7 @@ void ZMQServer::run() {
backend
->
bind
(
"inproc://backend"
);
backend
->
bind
(
"inproc://backend"
);
}
catch
(
exception
&
e
)
{
}
catch
(
exception
&
e
)
{
spdlog
::
error
(
"Could not bind to zmq backend: {}"
,
e
.
what
());
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() {
...
@@ -103,7 +103,7 @@ void ZMQServer::run() {
}
}
}
catch
(
std
::
exception
&
e
)
{
}
catch
(
std
::
exception
&
e
)
{
spdlog
::
error
(
"Could not create zmq server workers:{} "
,
e
.
what
());
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() {
...
@@ -123,7 +123,7 @@ void ZMQServer::run() {
return
;
return
;
}
}
spdlog
::
info
(
"Error, exiting zmq server ..."
);
spdlog
::
info
(
"Error, exiting zmq server ..."
);
return
;
exit
(
ZMQ_COULD_NOT_CREATE_PROXY
)
;
}
}
}
}
...
@@ -152,7 +152,6 @@ void ZMQServer::exitZMQServer() {
...
@@ -152,7 +152,6 @@ void ZMQServer::exitZMQServer() {
zmqServer
->
exitAll
();
zmqServer
->
exitAll
();
spdlog
::
info
(
"deleting zmq server"
);
spdlog
::
info
(
"deleting zmq server"
);
zmqServer
=
nullptr
;
zmqServer
=
nullptr
;
spdlog
::
info
(
"deleted zmq server "
);
spdlog
::
info
(
"deleted zmq server "
);
...
...
sgxwall.cpp
View file @
41fc3369
...
@@ -54,10 +54,10 @@ void SGXWallet::printUsage() {
...
@@ -54,10 +54,10 @@ void SGXWallet::printUsage() {
cerr
<<
"
\n
Backup, restore, update flags:
\n\n
"
;
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
<<
" -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
<<
" -y Do not ask user to acknowledge receipt of the backup key
\n
"
;
cerr
<<
"
\n
HTTPS
flags:
\n\n
"
;
cerr
<<
"
\n
Security flags
flags:
\n\n
"
;
cerr
<<
" -n
Launch sgxwallet using http. Default is to use https with a selg-signed server cert.
\n
"
;
cerr
<<
" -n
Use http instead of https. Default is to use https with a selg-signed server cert. Insecure!
\n
"
;
cerr
<<
" -c D
o not verify SSL client certs
\n
"
;
cerr
<<
" -c D
isable client authentication using certificates. Insecure!
\n
"
;
cerr
<<
" -s Sign
SSL client certs without human confirmation
\n
"
;
cerr
<<
" -s Sign
client certificates without human confirmation. Insecure!
\n
"
;
}
}
...
...
sgxwallet_common.h
View file @
41fc3369
...
@@ -168,6 +168,11 @@ extern bool autoconfirm;
...
@@ -168,6 +168,11 @@ extern bool autoconfirm;
#define ZMQ_NO_SIG_IN_MESSAGE -95
#define ZMQ_NO_SIG_IN_MESSAGE -95
#define ZMQ_NO_CERT_IN_MESSAGE -96
#define ZMQ_NO_CERT_IN_MESSAGE -96
#define ZMQ_COULD_NOT_VERIFY_SIG -97
#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
#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