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
34f8be85
Unverified
Commit
34f8be85
authored
Jun 17, 2021
by
Oleh Nikolaiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-3951 debug
parent
f2d4b3c0
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
ZMQClient.cpp
zmq_src/ZMQClient.cpp
+5
-6
ZMQMessage.cpp
zmq_src/ZMQMessage.cpp
+1
-1
ZMQServer.cpp
zmq_src/ZMQServer.cpp
+1
-0
No files found.
zmq_src/ZMQClient.cpp
View file @
34f8be85
...
...
@@ -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
);
}
...
...
zmq_src/ZMQMessage.cpp
View file @
34f8be85
...
...
@@ -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
);
}
}
...
...
zmq_src/ZMQServer.cpp
View file @
34f8be85
...
...
@@ -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
()
==
'}'
)
...
...
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