[#848] ir/container: Prevent potential NPE in key conversion

Set `Curve` field in `ecdsa.PublicKey` instance from `keys.PublicKey` one in
`checkKeyOwnership` method of container processor.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2021-09-24 14:14:51 +03:00 committed by Alex Vanin
parent 3e5c7e0ade
commit 264ab489bb

View file

@ -53,6 +53,7 @@ func (cp *Processor) checkKeyOwnership(ownerIDSrc ownerIDSource, key *keys.Publi
// TODO: need more convenient way to do this
w, err := owner.NEO3WalletFromPublicKey(&ecdsa.PublicKey{
Curve: key.Curve,
X: key.X,
Y: key.Y,
})