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
4bace098
Unverified
Commit
4bace098
authored
Aug 10, 2020
by
Oleh Nikolaiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-2977 clean up
parent
e5ffa2e9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
BLSPrivateKeyShareSGX.cpp
BLSPrivateKeyShareSGX.cpp
+3
-11
No files found.
BLSPrivateKeyShareSGX.cpp
View file @
4bace098
...
...
@@ -134,6 +134,9 @@ std::string BLSPrivateKeyShareSGX::signWithHelperSGXstr(
strncpy
(
xStrArg
,
xStr
->
c_str
(),
BUF_LEN
);
strncpy
(
yStrArg
,
yStr
->
c_str
(),
BUF_LEN
);
delete
xStr
;
delete
yStr
;
size_t
sz
=
0
;
uint8_t
encryptedKey
[
BUF_LEN
];
...
...
@@ -142,8 +145,6 @@ std::string BLSPrivateKeyShareSGX::signWithHelperSGXstr(
if
(
!
result
)
{
cerr
<<
"Invalid hex encrypted key"
<<
endl
;
delete
xStr
;
delete
yStr
;
BOOST_THROW_EXCEPTION
(
std
::
invalid_argument
(
"Invalid hex encrypted key"
));
}
...
...
@@ -157,22 +158,16 @@ std::string BLSPrivateKeyShareSGX::signWithHelperSGXstr(
if
(
status
!=
SGX_SUCCESS
)
{
gmp_printf
(
"SGX enclave call to trustedBlsSignMessage failed: 0x%04x
\n
"
,
status
);
delete
xStr
;
delete
yStr
;
BOOST_THROW_EXCEPTION
(
runtime_error
(
"SGX enclave call to trustedBlsSignMessage failed"
));
}
if
(
errStatus
!=
0
)
{
delete
xStr
;
delete
yStr
;
BOOST_THROW_EXCEPTION
(
runtime_error
(
"Enclave trustedBlsSignMessage failed:"
+
to_string
(
errStatus
)
+
":"
+
errMsg
));
}
int
sigLen
;
if
((
sigLen
=
strnlen
(
signature
,
10
))
<
10
)
{
delete
xStr
;
delete
yStr
;
BOOST_THROW_EXCEPTION
(
runtime_error
(
"Signature is too short:"
+
to_string
(
sigLen
)));
}
...
...
@@ -184,9 +179,6 @@ std::string BLSPrivateKeyShareSGX::signWithHelperSGXstr(
sig
.
append
(
":"
);
sig
.
append
(
hint
);
delete
xStr
;
delete
yStr
;
return
sig
;
}
...
...
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