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
97872a95
Unverified
Commit
97872a95
authored
Aug 27, 2020
by
Oleh Nikolaiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SKALE-2892 remove depricated methods
parent
a4382dc4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
74 deletions
+0
-74
SGXWalletServer.cpp
SGXWalletServer.cpp
+0
-42
SGXWalletServer.hpp
SGXWalletServer.hpp
+0
-8
stubclient.h
stubclient.h
+0
-24
No files found.
SGXWalletServer.cpp
View file @
97872a95
...
...
@@ -247,12 +247,6 @@ SGXWalletServer::blsSignMessageHashImpl(const string &_keyShareName, const strin
}
Json
::
Value
SGXWalletServer
::
importECDSAKeyImpl
(
const
string
&
_key
,
const
string
&
_keyName
)
{
INIT_RESULT
(
result
)
result
[
"encryptedKey"
]
=
""
;
RETURN_SUCCESS
(
result
)
}
Json
::
Value
SGXWalletServer
::
generateECDSAKeyImpl
()
{
spdlog
::
info
(
"Entering {}"
,
__FUNCTION__
);
INIT_RESULT
(
result
)
...
...
@@ -280,34 +274,6 @@ Json::Value SGXWalletServer::generateECDSAKeyImpl() {
RETURN_SUCCESS
(
result
);
}
Json
::
Value
SGXWalletServer
::
renameECDSAKeyImpl
(
const
string
&
_keyName
,
const
string
&
_tempKeyName
)
{
spdlog
::
info
(
"Entering {}"
,
__FUNCTION__
);
INIT_RESULT
(
result
)
result
[
"encryptedKey"
]
=
""
;
try
{
string
prefix
=
_tempKeyName
.
substr
(
0
,
8
);
if
(
prefix
!=
"tmp_NEK:"
)
{
throw
SGXException
(
UNKNOWN_ERROR
,
"invalid temp key name"
);
}
prefix
=
_keyName
.
substr
(
0
,
12
);
if
(
prefix
!=
"NEK_NODE_ID:"
)
{
throw
SGXException
(
UNKNOWN_ERROR
,
"invalid key name"
);
}
string
postfix
=
_keyName
.
substr
(
12
,
_keyName
.
length
());
if
(
!
isStringDec
(
postfix
))
{
throw
SGXException
(
UNKNOWN_ERROR
,
"invalid key name"
);
}
shared_ptr
<
string
>
encryptedKey
=
readFromDb
(
_tempKeyName
);
writeDataToDB
(
_keyName
,
*
encryptedKey
);
LevelDB
::
getLevelDb
()
->
deleteTempNEK
(
_tempKeyName
);
}
HANDLE_SGX_EXCEPTION
(
result
)
RETURN_SUCCESS
(
result
);
}
Json
::
Value
SGXWalletServer
::
ecdsaSignMessageHashImpl
(
int
_base
,
const
string
&
_keyName
,
const
string
&
_messageHash
)
{
spdlog
::
trace
(
"Entering {}"
,
__FUNCTION__
);
INIT_RESULT
(
result
)
...
...
@@ -672,10 +638,6 @@ Json::Value SGXWalletServer::generateECDSAKey() {
return
generateECDSAKeyImpl
();
}
Json
::
Value
SGXWalletServer
::
renameECDSAKey
(
const
string
&
_keyName
,
const
string
&
_tmpKeyName
)
{
return
renameECDSAKeyImpl
(
_keyName
,
_tmpKeyName
);
}
Json
::
Value
SGXWalletServer
::
getPublicECDSAKey
(
const
string
&
_keyName
)
{
return
getPublicECDSAKeyImpl
(
_keyName
);
}
...
...
@@ -693,10 +655,6 @@ Json::Value SGXWalletServer::blsSignMessageHash(const string &_keyShareName, con
return
blsSignMessageHashImpl
(
_keyShareName
,
_messageHash
,
_t
,
_n
);
}
Json
::
Value
SGXWalletServer
::
importECDSAKey
(
const
string
&
_key
,
const
string
&
_keyName
)
{
return
importECDSAKeyImpl
(
_key
,
_keyName
);
}
Json
::
Value
SGXWalletServer
::
complaintResponse
(
const
string
&
polyName
,
int
ind
)
{
return
complaintResponseImpl
(
polyName
,
ind
);
}
...
...
SGXWalletServer.hpp
View file @
97872a95
...
...
@@ -51,12 +51,8 @@ public:
virtual
Json
::
Value
blsSignMessageHash
(
const
string
&
_keyShareName
,
const
string
&
_messageHash
,
int
_t
,
int
_n
);
virtual
Json
::
Value
importECDSAKey
(
const
string
&
_key
,
const
string
&
_keyName
);
virtual
Json
::
Value
generateECDSAKey
();
virtual
Json
::
Value
renameECDSAKey
(
const
string
&
_keyName
,
const
string
&
_tmpKeyName
);
virtual
Json
::
Value
ecdsaSignMessageHash
(
int
_base
,
const
string
&
_keyShareName
,
const
string
&
_messageHash
);
...
...
@@ -102,12 +98,8 @@ public:
static
Json
::
Value
blsSignMessageHashImpl
(
const
string
&
_keyShareName
,
const
string
&
_messageHash
,
int
t
,
int
n
);
static
Json
::
Value
importECDSAKeyImpl
(
const
string
&
_key
,
const
string
&
_keyName
);
static
Json
::
Value
generateECDSAKeyImpl
();
static
Json
::
Value
renameECDSAKeyImpl
(
const
string
&
_keyName
,
const
string
&
_tempKeyName
);
static
Json
::
Value
ecdsaSignMessageHashImpl
(
int
_base
,
const
string
&
keyName
,
const
string
&
_messageHash
);
static
Json
::
Value
getPublicECDSAKeyImpl
(
const
string
&
_keyName
);
...
...
stubclient.h
View file @
97872a95
...
...
@@ -38,18 +38,6 @@ class StubClient : public jsonrpc::Client
throw
jsonrpc
::
JsonRpcException
(
jsonrpc
::
Errors
::
ERROR_CLIENT_INVALID_RESPONSE
,
result
.
toStyledString
());
}
Json
::
Value
importECDSAKey
(
const
std
::
string
&
key
,
const
std
::
string
&
keyName
)
{
Json
::
Value
p
;
p
[
"key"
]
=
key
;
p
[
"keyName"
]
=
keyName
;
Json
::
Value
result
=
this
->
CallMethod
(
"importECDSAKey"
,
p
);
if
(
result
.
isObject
())
return
result
;
else
throw
jsonrpc
::
JsonRpcException
(
jsonrpc
::
Errors
::
ERROR_CLIENT_INVALID_RESPONSE
,
result
.
toStyledString
());
}
Json
::
Value
generateECDSAKey
()
{
Json
::
Value
p
;
...
...
@@ -61,18 +49,6 @@ class StubClient : public jsonrpc::Client
throw
jsonrpc
::
JsonRpcException
(
jsonrpc
::
Errors
::
ERROR_CLIENT_INVALID_RESPONSE
,
result
.
toStyledString
());
}
Json
::
Value
renameECDSAKey
(
const
std
::
string
&
KeyName
,
const
std
::
string
&
tempKeyName
)
{
Json
::
Value
p
;
p
[
"keyName"
]
=
KeyName
;
p
[
"tempKeyName"
]
=
tempKeyName
;
Json
::
Value
result
=
this
->
CallMethod
(
"renameECDSAKey"
,
p
);
if
(
result
.
isObject
())
return
result
;
else
throw
jsonrpc
::
JsonRpcException
(
jsonrpc
::
Errors
::
ERROR_CLIENT_INVALID_RESPONSE
,
result
.
toStyledString
());
}
Json
::
Value
getPublicECDSAKey
(
const
std
::
string
&
keyName
)
{
Json
::
Value
p
;
...
...
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