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
84d9a87c
Commit
84d9a87c
authored
Jan 11, 2021
by
Stan Kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENABLE_ZEROMQ
parent
9d67f212
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
2 deletions
+58
-2
CMakeLists.txt
CMakeLists.txt
+1
-1
Makefile.am
Makefile.am
+1
-1
ZMQClient.cpp
ZMQClient.cpp
+5
-0
ZMQClient.h
ZMQClient.h
+51
-0
No files found.
CMakeLists.txt
View file @
84d9a87c
...
...
@@ -82,4 +82,4 @@ add_executable(sgxwallet
SGXWalletServer.hpp
stubclient.cpp
stubclient.h
testw.cpp
)
testw.cpp
ZMQClient.cpp ZMQClient.h
)
Makefile.am
View file @
84d9a87c
...
...
@@ -74,7 +74,7 @@ COMMON_SRC = ECDSASignReqMessage.cpp BLSSignReqMessage.cpp ZMQMessage.cpp ZMQSer
SGXWalletServer.cpp SGXRegistrationServer.cpp CSRManagerServer.cpp BLSCrypto.cpp
\
DKGCrypto.cpp ServerInit.cpp BLSPrivateKeyShareSGX.cpp LevelDB.cpp ServerDataChecker.cpp SEKManager.cpp
\
third_party/intel/sgx_stub.c third_party/intel/sgx_detect_linux.c third_party/intel/create_enclave.c third_party/intel/oc_alloc.c
\
ECDSAImpl.c TestUtils.cpp sgxwallet.c SGXInfoServer.cpp ECDSACrypto.cpp
ECDSAImpl.c TestUtils.cpp sgxwallet.c SGXInfoServer.cpp ECDSACrypto.cpp
ZMQClient.cpp
COMMON_ENCLAVE_SRC
=
secure_enclave_u.c secure_enclave_u.h
sgxwallet_SOURCES
=
sgxwall.cpp
$(COMMON_SRC)
...
...
ZMQClient.cpp
0 → 100644
View file @
84d9a87c
//
// Created by skale on 11.01.21.
//
#include "ZMQClient.h"
ZMQClient.h
0 → 100644
View file @
84d9a87c
//
// Created by skale on 11.01.21.
//
#ifndef SGXWALLET_ZMQCLIENT_H
#define SGXWALLET_ZMQCLIENT_H
#include <jsonrpccpp/client.h>
class
ZMQClient
{
Json
::
Value
blsSignMessageHash
(
const
std
::
string
&
keyShareName
,
const
std
::
string
&
messageHash
,
int
t
,
int
n
)
{
Json
::
Value
p
;
p
[
"method"
]
=
"blsSignMessageHash"
;
p
[
"keyShareName"
]
=
keyShareName
;
p
[
"messageHash"
]
=
messageHash
;
p
[
"n"
]
=
n
;
p
[
"t"
]
=
t
;
Json
::
Value
result
=
sendRequest
(
p
);
if
(
result
.
isObject
())
return
result
;
else
throw
jsonrpc
::
JsonRpcException
(
jsonrpc
::
Errors
::
ERROR_CLIENT_INVALID_RESPONSE
,
result
.
toStyledString
());
}
Json
::
Value
sendRequest
(
Json
::
Value
&
_req
)
{};
Json
::
Value
ecdsaSignMessageHash
(
int
base
,
const
std
::
string
&
keyName
,
const
std
::
string
&
messageHash
)
{
Json
::
Value
p
;
p
[
"method"
]
=
"ecdsaSignMessageHash"
;
p
[
"base"
]
=
base
;
p
[
"keyName"
]
=
keyName
;
p
[
"messageHash"
]
=
messageHash
;
Json
::
Value
result
=
sendRequest
(
p
);
if
(
result
.
isObject
())
return
result
;
else
throw
jsonrpc
::
JsonRpcException
(
jsonrpc
::
Errors
::
ERROR_CLIENT_INVALID_RESPONSE
,
result
.
toStyledString
());
}
};
#endif //SGXWALLET_ZMQCLIENT_H
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