Skip to content

Commit

Permalink
Update vendored libsecp to v0.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Davidson-Souza committed Sep 30, 2023
1 parent d2285c9 commit 80b2a8d
Show file tree
Hide file tree
Showing 155 changed files with 21,787 additions and 8,019 deletions.
2 changes: 1 addition & 1 deletion Cargo-minimal.lock
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ dependencies = [

[[package]]
name = "secp256k1-sys"
version = "0.8.1"
version = "0.9.0"
dependencies = [
"cc",
"libc",
Expand Down
2 changes: 1 addition & 1 deletion Cargo-recent.lock
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ dependencies = [

[[package]]
name = "secp256k1-sys"
version = "0.8.1"
version = "0.9.0"
dependencies = [
"cc",
"libc",
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ global-context = ["std"]
global-context-less-secure = ["global-context"]

[dependencies]
secp256k1-sys = { version = "0.8.1", default-features = false, path = "./secp256k1-sys" }
secp256k1-sys = { version = "0.9.0", default-features = false, path = "./secp256k1-sys" }
serde = { version = "1.0.103", default-features = false, optional = true }

# You likely only want to enable these if you explicitly do not want to use "std", otherwise enable
Expand Down
4 changes: 2 additions & 2 deletions secp256k1-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "secp256k1-sys"
version = "0.8.1"
version = "0.9.0"
authors = [ "Dawid Ciężarkiewicz <dpc@ucore.info>",
"Andrew Poelstra <apoelstra@wpsoftware.net>",
"Steven Roose <steven@stevenroose.org>" ]
Expand All @@ -12,7 +12,7 @@ description = "FFI for Pieter Wuille's `libsecp256k1` library."
keywords = [ "secp256k1", "libsecp256k1", "ffi" ]
readme = "README.md"
build = "build.rs"
links = "rustsecp256k1_v0_8_1"
links = "rustsecp256k1_v0_9_0"
edition = "2018"

[package.metadata.docs.rs]
Expand Down
6 changes: 6 additions & 0 deletions secp256k1-sys/depend/lax_der_parsing.c.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
10c10,12
<
---
> extern int secp256k1_ecdsa_signature_parse_compact(
> const secp256k1_context *ctx,
> secp256k1_ecdsa_signature *sig, const unsigned char *input64);
2 changes: 1 addition & 1 deletion secp256k1-sys/depend/secp256k1-HEAD-revision.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This file was automatically created by vendor-libsecp.sh
21ffe4b22a9683cf24ae0763359e401d1284cc7a
199d27cea32203b224b208627533c2e813cd3b21
21 changes: 14 additions & 7 deletions secp256k1-sys/depend/secp256k1.c.patch
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
139,149d138
140,150d139
< secp256k1_context* secp256k1_context_create(unsigned int flags) {
< size_t const prealloc_size = secp256k1_context_preallocated_size(flags);
< secp256k1_context* ctx = (secp256k1_context*)checked_malloc(&default_error_callback, prealloc_size);
Expand All @@ -10,27 +10,34 @@
< return ctx;
< }
<
164,174d152
162,174d150
< secp256k1_context* secp256k1_context_clone(const secp256k1_context* ctx) {
< secp256k1_context* ret;
< size_t prealloc_size;
<
< VERIFY_CHECK(ctx != NULL);
< ARG_CHECK(secp256k1_context_is_proper(ctx));
<
< prealloc_size = secp256k1_context_preallocated_clone_size(ctx);
< ret = (secp256k1_context*)checked_malloc(&ctx->error_callback, prealloc_size);
< ret = secp256k1_context_preallocated_clone(ctx, ret);
< return ret;
< }
<
183,189d160
186,197d161
< void secp256k1_context_destroy(secp256k1_context* ctx) {
< if (ctx != NULL) {
< secp256k1_context_preallocated_destroy(ctx);
< free(ctx);
< ARG_CHECK_VOID(ctx == NULL || secp256k1_context_is_proper(ctx));
<
< /* Defined as noop */
< if (ctx == NULL) {
< return;
< }
<
< secp256k1_context_preallocated_destroy(ctx);
< free(ctx);
< }
<
206,215d176
220,229d183
< }
<
< secp256k1_scratch_space* secp256k1_scratch_space_create(const secp256k1_context* ctx, size_t max_size) {
Expand Down
40 changes: 27 additions & 13 deletions secp256k1-sys/depend/secp256k1.h.patch
Original file line number Diff line number Diff line change
@@ -1,22 +1,36 @@
226,228d225
< SECP256K1_API secp256k1_context* secp256k1_context_create(
236d235
< SECP256K1_API const secp256k1_context *secp256k1_context_static;
239,240d237
< SECP256K1_API const secp256k1_context *secp256k1_context_no_precomp
< SECP256K1_DEPRECATED("Use secp256k1_context_static instead");
286,289d282
< SECP256K1_API secp256k1_context *secp256k1_context_create(
< unsigned int flags
< ) SECP256K1_WARN_UNUSED_RESULT;
231,233d227
< SECP256K1_API secp256k1_context* secp256k1_context_clone(
< const secp256k1_context* ctx
<
302,305d294
< SECP256K1_API secp256k1_context *secp256k1_context_clone(
< const secp256k1_context *ctx
< ) SECP256K1_ARG_NONNULL(1) SECP256K1_WARN_UNUSED_RESULT;
248,250d241
<
320,323d308
< SECP256K1_API void secp256k1_context_destroy(
< secp256k1_context* ctx
< secp256k1_context *ctx
< ) SECP256K1_ARG_NONNULL(1);
327,330d317
< SECP256K1_API SECP256K1_WARN_UNUSED_RESULT secp256k1_scratch_space* secp256k1_scratch_space_create(
< const secp256k1_context* ctx,
<
402,406d386
< SECP256K1_API SECP256K1_WARN_UNUSED_RESULT secp256k1_scratch_space *secp256k1_scratch_space_create(
< const secp256k1_context *ctx,
< size_t size
< ) SECP256K1_ARG_NONNULL(1);
338,341d324
<
413,417d392
< SECP256K1_API void secp256k1_scratch_space_destroy(
< const secp256k1_context* ctx,
< secp256k1_scratch_space* scratch
< const secp256k1_context *ctx,
< secp256k1_scratch_space *scratch
< ) SECP256K1_ARG_NONNULL(1);
<
636d610
< SECP256K1_API const secp256k1_nonce_function secp256k1_nonce_function_rfc6979;
639d612
< SECP256K1_API const secp256k1_nonce_function secp256k1_nonce_function_default;
Loading

0 comments on commit 80b2a8d

Please sign in to comment.