Commit 84d9a87c authored by Stan Kladko's avatar Stan Kladko

ENABLE_ZEROMQ

parent 9d67f212
......@@ -82,4 +82,4 @@ add_executable(sgxwallet
SGXWalletServer.hpp
stubclient.cpp
stubclient.h
testw.cpp)
testw.cpp ZMQClient.cpp ZMQClient.h)
......@@ -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)
......
//
// Created by skale on 11.01.21.
//
#include "ZMQClient.h"
//
// 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment