Skip to content

Commit

Permalink
Fix missing macro
Browse files Browse the repository at this point in the history
  • Loading branch information
Harrm committed Feb 9, 2024
1 parent 88d0be2 commit ace3e08
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions include/secp256k1_recovery.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,15 @@ SECP256K1_API int secp256k1_ecdsa_recoverable_signature_parse_compact(
int recid
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);


/** Parse a compact ECDSA signature (64 bytes + recovery id), allowing overflow.
*
* Returns: 1 when the signature could be parsed, 0 otherwise
* Args: ctx: a secp256k1 context object
* Out: sig: a pointer to a signature object
* In: input64: a pointer to a 64-byte compact signature
* recid: the recovery id (0, 1, 2 or 3)
*/
SECP256K1_API void secp256k1_ecdsa_recoverable_signature_parse_compact_overflow(
const secp256k1_context* ctx,
secp256k1_ecdsa_recoverable_signature* sig,
Expand Down
6 changes: 6 additions & 0 deletions src/secp256k1.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,12 @@
} \
} while(0)

#define ARG_CHECK_NO_RETURN(cond) do { \
if (EXPECT(!(cond), 0)) { \
secp256k1_callback_call(&ctx->illegal_callback, #cond); \
} \
} while(0)

/* Note that whenever you change the context struct, you must also change the
* context_eq function. */
struct secp256k1_context_struct {
Expand Down

0 comments on commit ace3e08

Please sign in to comment.