Unverified Commit 466e8b7d authored by svetaro's avatar svetaro

fixes

parent 3f8f0434
......@@ -32,11 +32,12 @@ SGXWalletServer::SGXWalletServer(AbstractServerConnector &connector,
: AbstractStubServer(connector, type) {}
SGXWalletServer* s = nullptr;
HttpServer* hs = nullptr;
int init_server() {
HttpServer httpserver(1025);
s = new SGXWalletServer(httpserver,
JSONRPC_SERVER_V1V2); // hybrid server (json-rpc 1.0 & 2.0)
hs = new HttpServer(1025);
s = new SGXWalletServer(*hs,
JSONRPC_SERVER_V2); // hybrid server (json-rpc 1.0 & 2.0)
if (!s->StartListening()) {
cerr << "Server could not start listening" << endl;
......
......@@ -33,7 +33,6 @@ class AbstractStubServer : public jsonrpc::AbstractServer<AbstractStubServer>
}
inline virtual void generateECDSAKeyI(const Json::Value &request, Json::Value &response)
{
std::cerr <<"Got request" << std::endl;
response = this->generateECDSAKey(request["keyName"].asString());
}
inline virtual void ecdsaSignMessageHashI(const Json::Value &request, Json::Value &response)
......
......@@ -51,8 +51,7 @@
"returns": {
"status": 0,
"errorMessage": "12345",
"encryptedKey": "12345",
"publicKey": "12345"
"encryptedKey": "12345"
}
},
......
......@@ -422,7 +422,7 @@ TEST_CASE("API test", "[api_test]") {
// s.StartListening();
cerr << "Server inited" << endl;
HttpClient client("http://localhost:1025");
StubClient c(client, JSONRPC_CLIENT_V1);
StubClient c(client, JSONRPC_CLIENT_V2);
cerr << "Client inited" << endl;
......
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