mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
Revert "accounts/keystore: handle error for invalid key in DecryptKey (#27432)"
This reverts commit bfc46a4913.
This commit is contained in:
parent
73608c0edf
commit
5cbb61695e
1 changed files with 2 additions and 5 deletions
|
|
@ -225,13 +225,10 @@ func DecryptKey(keyjson []byte, auth string) (*Key, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
key, err := crypto.ToECDSA(keyBytes)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid key: %w", err)
|
||||
}
|
||||
key := crypto.ToECDSAUnsafe(keyBytes)
|
||||
id, err := uuid.FromBytes(keyId)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("invalid UUID: %w", err)
|
||||
return nil, err
|
||||
}
|
||||
return &Key{
|
||||
Id: id,
|
||||
|
|
|
|||
Loading…
Reference in a new issue