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
877c416a
Unverified
Commit
877c416a
authored
Jun 03, 2021
by
Oleh Nikolaiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-3951 format code
parent
0ac631cc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
21 deletions
+0
-21
ServerInit.cpp
ServerInit.cpp
+0
-4
ServerWorker.cpp
zmq_src/ServerWorker.cpp
+0
-5
ZMQClient.cpp
zmq_src/ZMQClient.cpp
+0
-1
ZMQClient.h
zmq_src/ZMQClient.h
+0
-11
No files found.
ServerInit.cpp
View file @
877c416a
...
...
@@ -103,10 +103,8 @@ void initUserSpace() {
}
uint64_t
initEnclave
()
{
#ifndef SGX_HW_SIM
unsigned
long
support
;
support
=
get_sgx_support
();
...
...
@@ -161,7 +159,6 @@ uint64_t initEnclave() {
return
SGX_SUCCESS
;
}
void
initAll
(
uint32_t
_logLevel
,
bool
_checkCert
,
bool
_checkZMQSig
,
bool
_autoSign
,
bool
_generateTestKeys
)
{
...
...
@@ -237,5 +234,4 @@ void exitAll() {
CSRManagerServer
::
exitServer
();
SGXInfoServer
::
exitServer
();
ZMQServer
::
exitZMQServer
();
}
zmq_src/ServerWorker.cpp
View file @
877c416a
...
...
@@ -53,8 +53,6 @@ ServerWorker::ServerWorker(zmq::context_t &_ctx, int sock_type, bool _checkSigna
zmq_setsockopt
(
*
worker
,
ZMQ_LINGER
,
&
linger
,
sizeof
(
linger
));
};
void
ServerWorker
::
doOneServerLoop
()
noexcept
{
string
replyStr
;
...
...
@@ -68,7 +66,6 @@ void ServerWorker::doOneServerLoop() noexcept {
try
{
zmq_pollitem_t
items
[
1
];
items
[
0
].
socket
=
*
worker
;
items
[
0
].
events
=
ZMQ_POLLIN
;
...
...
@@ -154,9 +151,7 @@ void ServerWorker::work() {
spdlog
::
info
(
"Exited worker thread {}"
,
index
);
}
void
ServerWorker
::
requestExit
()
{
isExitRequested
.
exchange
(
true
);
spdlog
::
info
(
"Closed worker socket {}"
,
index
);
}
zmq_src/ZMQClient.cpp
View file @
877c416a
...
...
@@ -121,7 +121,6 @@ string ZMQClient::doZmqRequestReply(string &_req) {
}
}
string
ZMQClient
::
readFileIntoString
(
const
string
&
_fileName
)
{
ifstream
t
(
_fileName
);
string
str
((
istreambuf_iterator
<
char
>
(
t
)),
istreambuf_iterator
<
char
>
());
...
...
zmq_src/ZMQClient.h
View file @
877c416a
...
...
@@ -21,9 +21,6 @@
@date 2021
*/
#ifndef SGXWALLET_ZMQCLIENT_H
#define SGXWALLET_ZMQCLIENT_H
...
...
@@ -40,28 +37,21 @@
#include <jsonrpccpp/client.h>
#include "ZMQMessage.h"
#define REQUEST_TIMEOUT 10000 // msecs, (> 1000!)
class
ZMQClient
{
private
:
EVP_PKEY
*
pkey
=
0
;
EVP_PKEY
*
pubkey
=
0
;
X509
*
x509Cert
=
0
;
bool
sign
=
true
;
string
certFileName
=
""
;
string
certKeyName
=
""
;
string
certificate
=
""
;
string
key
=
""
;
recursive_mutex
mutex
;
zmq
::
context_t
ctx
;
...
...
@@ -82,7 +72,6 @@ private:
public
:
ZMQClient
(
const
string
&
ip
,
uint16_t
port
,
bool
_sign
,
const
string
&
_certPathName
,
const
string
&
_certKeyName
);
...
...
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