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
a71e43c2
Unverified
Commit
a71e43c2
authored
Sep 03, 2020
by
kladko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-3213-improve-error-handling
parent
4c8a3998
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
8 deletions
+10
-8
BLSCrypto.cpp
BLSCrypto.cpp
+10
-8
No files found.
BLSCrypto.cpp
View file @
a71e43c2
...
...
@@ -218,14 +218,19 @@ bool sign_aes(const char *_encryptedKeyHex, const char *_hashHex, size_t _t, siz
sz
,
xStrArg
,
yStrArg
,
signature
);
if
(
status
!=
SGX_SUCCESS
)
{
cerr
<<
"SGX enclave call to trustedBlsSignMessage failed with status:"
<<
status
<<
std
::
endl
;
BOOST_THROW_EXCEPTION
(
runtime_error
(
"SGX enclave call to trustedBlsSignMessage failed"
));
string
errString
=
string
(
"SGX enclave call to "
)
+
__FUNCTION__
+
" failed with errStatus:"
+
to_string
(
status
)
+
" Err message:"
+
errMsg
;
BOOST_THROW_EXCEPTION
(
runtime_error
(
errString
));
}
if
(
errStatus
!=
0
)
{
cerr
<<
"SGX enclave call to trustedBlsSignMessage failed with errStatus:"
<<
errStatus
<<
std
::
endl
;
BOOST_THROW_EXCEPTION
(
runtime_error
(
"SGX enclave call to trustedBlsSignMessage failed"
));
string
errString
=
string
(
"SGX enclave call to "
)
+
__FUNCTION__
+
" failed with errStatus:"
+
to_string
(
errStatus
)
+
" Err message:"
+
errMsg
;
BOOST_THROW_EXCEPTION
(
runtime_error
(
errString
));
}
std
::
string
hint
=
BLSutils
::
ConvertToString
(
hash_with_hint
.
first
.
Y
)
+
":"
+
hash_with_hint
.
second
;
...
...
@@ -255,11 +260,8 @@ std::string encryptBLSKeyShare2Hex(int *errStatus, char *err_string, const char
status
=
trustedEncryptKeyAES
(
eid
,
errStatus
,
errMsg
->
data
(),
keyArray
->
data
(),
encryptedKey
->
data
(),
&
encryptedLen
);
spdlog
::
debug
(
"errStatus is {}"
,
*
errStatus
);
spdlog
::
debug
(
"errMsg is "
,
errMsg
->
data
());
if
(
*
errStatus
!=
0
)
{
throw
SGXException
(
-
666
,
errMsg
->
data
(
));
BOOST_THROW_EXCEPTION
(
SGXException
(
-
666
,
errMsg
->
data
()
));
}
if
(
status
!=
SGX_SUCCESS
)
{
...
...
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