SKALE-3951 debug

parent f2d4b3c0
......@@ -134,6 +134,9 @@ void ZMQClient::verifySig(EVP_PKEY* _pubkey, const string& _str, const string& _
auto msgToSign = std::regex_replace(_str, r, "");
vector<uint8_t> binSig(256,0);
std::cout << "VERIFYING SIG: " << _str << '\n' << msgToSign << std::endl;
// std::cout << signString(pkey, _str) << std::endl;
uint64_t binLen = 0;
......@@ -153,9 +156,6 @@ void ZMQClient::verifySig(EVP_PKEY* _pubkey, const string& _str, const string& _
CHECK_STATE(EVP_DigestVerifyUpdate(mdctx, msgToSign.c_str(), msgToSign.size()) == 1);
/* First call EVP_DigestSignFinal with a NULL sig parameter to obtain the length of the
* signature. Length is returned in slen */
CHECK_STATE2(EVP_DigestVerifyFinal(mdctx, binSig.data(), binLen) == 1,
ZMQ_COULD_NOT_VERIFY_SIG);
......@@ -260,7 +260,6 @@ ZMQClient::ZMQClient(const string &ip, uint16_t port, bool _sign, const string &
certFileName = _certFileName;
certKeyName = _certKeyName;
url = "tcp://" + ip + ":" + to_string(port);
}
......
......@@ -145,7 +145,7 @@ shared_ptr <ZMQMessage> ZMQMessage::parse(const char *_msg,
auto msgToVerify = buffer.GetString();
ZMQClient::verifySig(publicKey,msgToVerify, *msgSig );
ZMQClient::verifySig(publicKey, msgToVerify, *msgSig );
}
}
......
......@@ -174,6 +174,7 @@ void ZMQServer::doOneServerLoop() {
}
stringToParse = string((char *) reqMsg.data(), reqMsg.size());
std::cout << "RECEIVED MSG: " << stringToParse << std::endl;
CHECK_STATE(stringToParse.front() == '{')
CHECK_STATE(stringToParse.back() == '}')
......
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