mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-27 23:26:44 +00:00
Co-authored-by: Felix Lange <fjl@twurst.com>
This commit is contained in:
parent
cdca79128b
commit
d9086a2838
1 changed files with 3 additions and 0 deletions
|
|
@ -178,6 +178,9 @@ func UnmarshalPubkey(pub []byte) (*ecdsa.PublicKey, error) {
|
|||
if x == nil {
|
||||
return nil, errInvalidPubkey
|
||||
}
|
||||
if !S256().IsOnCurve(x, y) {
|
||||
return nil, errInvalidPubkey
|
||||
}
|
||||
return &ecdsa.PublicKey{Curve: S256(), X: x, Y: y}, nil
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue