crypto: replace ToECDSAPub with error-checking func UnmarshalPubkey (#16932)
ToECDSAPub was unsafe because it returned a non-nil key with nil X, Y in case of invalid input. This change replaces ToECDSAPub with UnmarshalPubkey across the codebase.
Showing
- cmd/wnode/main.go 4 additions, 9 deletionscmd/wnode/main.go
- crypto/crypto.go 8 additions, 5 deletionscrypto/crypto.go
- crypto/crypto_test.go 30 additions, 1 deletioncrypto/crypto_test.go
- internal/ethapi/api.go 2 additions, 4 deletionsinternal/ethapi/api.go
- p2p/rlpx.go 3 additions, 3 deletionsp2p/rlpx.go
- signer/core/api.go 2 additions, 4 deletionssigner/core/api.go
- swarm/services/swap/swap.go 7 additions, 1 deletionswarm/services/swap/swap.go
- whisper/whisperv5/api.go 3 additions, 6 deletionswhisper/whisperv5/api.go
- whisper/whisperv6/api.go 3 additions, 6 deletionswhisper/whisperv6/api.go
Loading
Please register or sign in to comment