-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cgo: Add verify message. #9
Conversation
c7cb7fe
to
991e59c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UtAck.
991e59c
to
16b2e91
Compare
return errCResponse("unable to decode signature: %v", err) | ||
} | ||
|
||
ok, err = dcrwallet.VerifyMessage(goString(cMessage), addr, sig, w.MainWallet().ChainParams()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// Addresses must have an associated secp256k1 private key and therefore
// must be P2PK or P2PKH (P2SH is not allowed).
switch addr.(type) {
case *stdaddr.AddressPubKeyEcdsaSecp256k1V0:
case *stdaddr.AddressPubKeyHashEcdsaSecp256k1V0:
// Valid address types, proceed with verification.
default:
return errCResponse("invalid address type: must be P2PK or P2PKH")
}
shouldn't we be checking to ensure the address is not P2SH?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah. I assumed it would error somewhere along the way anyhow but we can check.
16b2e91
to
71bb927
Compare
Added script type check and seed tweak https://github.com/decred/libwallet/compare/16b2e9192415c528b5afcf4fda227db76210b6fc..6fd12c60af251aa2b5c97b50e7a5d07078f4a74e |
71bb927
to
6fd12c6
Compare
6fd12c6
to
c890cb2
Compare
No description provided.