Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
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
张蕾
Geth-Modification
Commits
ae82c586
Commit
ae82c586
authored
Feb 21, 2019
by
Guillaume Ballet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix some linter issues
parent
7b230b7e
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
securechannel.go
accounts/scwallet/securechannel.go
+1
-5
wallet.go
accounts/scwallet/wallet.go
+2
-2
No files found.
accounts/scwallet/securechannel.go
View file @
ae82c586
...
...
@@ -165,11 +165,7 @@ func (s *SecureChannelSession) Open() error {
// The IV is the last bytes returned from the Open APDU.
s
.
iv
=
response
.
Data
[
scSecretLength
:
]
if
err
:=
s
.
mutuallyAuthenticate
();
err
!=
nil
{
return
err
}
return
nil
return
s
.
mutuallyAuthenticate
()
}
// mutuallyAuthenticate is an internal method to authenticate both ends of the
...
...
accounts/scwallet/wallet.go
View file @
ae82c586
...
...
@@ -1060,7 +1060,7 @@ func determinePublicKey(sig, pubkeyX []byte) ([]byte, error) {
sig
[
64
]
=
byte
(
v
)
pubkey
,
err
:=
crypto
.
Ecrecover
(
DerivationSignatureHash
[
:
],
sig
)
if
err
==
nil
{
if
bytes
.
Compare
(
pubkey
[
1
:
33
],
pubkeyX
)
==
0
{
if
bytes
.
Equal
(
pubkey
[
1
:
33
],
pubkeyX
)
{
return
pubkey
,
nil
}
}
else
if
v
==
1
||
err
!=
secp256k1
.
ErrRecoverFailed
{
...
...
@@ -1077,7 +1077,7 @@ func makeRecoverableSignature(hash, sig, expectedPubkey []byte) ([]byte, error)
sig
[
64
]
=
byte
(
v
)
pubkey
,
err
:=
crypto
.
Ecrecover
(
hash
,
sig
)
if
err
==
nil
{
if
bytes
.
Compare
(
pubkey
,
expectedPubkey
)
==
0
{
if
bytes
.
Equal
(
pubkey
,
expectedPubkey
)
{
return
sig
,
nil
}
}
else
if
v
==
1
||
err
!=
secp256k1
.
ErrRecoverFailed
{
...
...
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