pubkey: Assert CPubKey's ECCVerifyHandle precondition#17275
pubkey: Assert CPubKey's ECCVerifyHandle precondition#17275maflcko merged 1 commit intobitcoin:masterfrom
Conversation
|
Concept ACK, I think the "Users of this module must hold an ECCVerifyHandle." message is unclear, doesn't provide context. |
7d74d51 to
d8daa8f
Compare
|
I've now changed to the suggested wording. The old wording was taken from here: Line 227 in 7730260 Please re-review :) |
|
@fanquake No longer waiting for author? :) |
|
@laanwj Would you mind reviewing? :) |
|
I think it would be good to have these assertions in. Without these it is possible for someone to mess up and have a NULL Consider the following example: That function will return also in cases where I think it would be good to guard against those sharp edges by adding the suggested assertions :) In this case: |
d8daa8f pubkey: Assert CPubKey's ECCVerifyHandle precondition (practicalswift) Pull request description: Assert `CPubKey`'s `ECCVerifyHandle` precondition. This makes it more clear for fuzzing harness writers and others that `ECCVerifyHandle` is expected to be held when interacting with `CPubKey`. Related PR #17274. ACKs for top commit: sipa: ACK d8daa8f Tree-SHA512: 9e74086599799dc9b5c3fb8357445b662e5bf896d826af63d6d6b6ddb616612966f3bb5de3bd3ae0e692c47de85672f64b8ab6d3a1c45899dc25ba46990b5ec7
…ition d8daa8f pubkey: Assert CPubKey's ECCVerifyHandle precondition (practicalswift) Pull request description: Assert `CPubKey`'s `ECCVerifyHandle` precondition. This makes it more clear for fuzzing harness writers and others that `ECCVerifyHandle` is expected to be held when interacting with `CPubKey`. Related PR bitcoin#17274. ACKs for top commit: sipa: ACK d8daa8f Tree-SHA512: 9e74086599799dc9b5c3fb8357445b662e5bf896d826af63d6d6b6ddb616612966f3bb5de3bd3ae0e692c47de85672f64b8ab6d3a1c45899dc25ba46990b5ec7
Summary: > This makes it more clear for fuzzing harness writers and others that ECCVerifyHandle is expected to be held when interacting with CPubKey. > > Related [[bitcoin/bitcoin#17274 | PR17274]] (D6883). This is a backport of Core [[bitcoin/bitcoin#17275 | PR17275]] Test Plan: `ninja all check-all` Reviewers: #bitcoin_abc, Fabien Reviewed By: #bitcoin_abc, Fabien Differential Revision: https://reviews.bitcoinabc.org/D8301
…ition d8daa8f pubkey: Assert CPubKey's ECCVerifyHandle precondition (practicalswift) Pull request description: Assert `CPubKey`'s `ECCVerifyHandle` precondition. This makes it more clear for fuzzing harness writers and others that `ECCVerifyHandle` is expected to be held when interacting with `CPubKey`. Related PR bitcoin#17274. ACKs for top commit: sipa: ACK d8daa8f Tree-SHA512: 9e74086599799dc9b5c3fb8357445b662e5bf896d826af63d6d6b6ddb616612966f3bb5de3bd3ae0e692c47de85672f64b8ab6d3a1c45899dc25ba46990b5ec7
…ition d8daa8f pubkey: Assert CPubKey's ECCVerifyHandle precondition (practicalswift) Pull request description: Assert `CPubKey`'s `ECCVerifyHandle` precondition. This makes it more clear for fuzzing harness writers and others that `ECCVerifyHandle` is expected to be held when interacting with `CPubKey`. Related PR bitcoin#17274. ACKs for top commit: sipa: ACK d8daa8f Tree-SHA512: 9e74086599799dc9b5c3fb8357445b662e5bf896d826af63d6d6b6ddb616612966f3bb5de3bd3ae0e692c47de85672f64b8ab6d3a1c45899dc25ba46990b5ec7
…ition d8daa8f pubkey: Assert CPubKey's ECCVerifyHandle precondition (practicalswift) Pull request description: Assert `CPubKey`'s `ECCVerifyHandle` precondition. This makes it more clear for fuzzing harness writers and others that `ECCVerifyHandle` is expected to be held when interacting with `CPubKey`. Related PR bitcoin#17274. ACKs for top commit: sipa: ACK d8daa8f Tree-SHA512: 9e74086599799dc9b5c3fb8357445b662e5bf896d826af63d6d6b6ddb616612966f3bb5de3bd3ae0e692c47de85672f64b8ab6d3a1c45899dc25ba46990b5ec7
Assert
CPubKey'sECCVerifyHandleprecondition.This makes it more clear for fuzzing harness writers and others that
ECCVerifyHandleis expected to be held when interacting withCPubKey.Related PR #17274.