Skip to content

Commit 80c856c

Browse files
authored
Merge pull request #189 from stevenroose/fix-links
Fix the manifest links property for secp256k1-sys
2 parents ff6e944 + ebc660b commit 80c856c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+4209
-4200
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11

2+
# 0.17.1
3+
4+
- Correctly prefix the secp256k1-sys links field in Cargo.toml.
5+
26
# 0.17.0
37

48
- Move FFI into secp256k1-sys crate.

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "secp256k1"
4-
version = "0.17.0"
4+
version = "0.17.1"
55
authors = [ "Dawid Ciężarkiewicz <dpc@ucore.info>",
66
"Andrew Poelstra <apoelstra@wpsoftware.net>" ]
77
license = "CC0-1.0"
@@ -38,7 +38,7 @@ external-symbols = ["secp256k1-sys/external-symbols"]
3838
fuzztarget = ["secp256k1-sys/fuzztarget"]
3939

4040
[dependencies]
41-
secp256k1-sys = { version = "0.1.0", default-features = false, path = "./secp256k1-sys" }
41+
secp256k1-sys = { version = "0.1.1", default-features = false, path = "./secp256k1-sys" }
4242

4343
[dev-dependencies]
4444
rand = "0.6"

secp256k1-sys/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "secp256k1-sys"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
authors = [ "Dawid Ciężarkiewicz <dpc@ucore.info>",
55
"Andrew Poelstra <apoelstra@wpsoftware.net>",
66
"Steven Roose <steven@stevenroose.org>" ]
@@ -12,7 +12,7 @@ description = "FFI for Pieter Wuille's `libsecp256k1` library."
1212
keywords = [ "secp256k1", "libsecp256k1", "ffi" ]
1313
readme = "README.md"
1414
build = "build.rs"
15-
links = "secp256k1"
15+
links = "rustsecp256k1_v0_1_1"
1616

1717
# Should make docs.rs show all functions, even those behind non-default features
1818
[package.metadata.docs.rs]

secp256k1-sys/depend/secp256k1/Makefile.am

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ ACLOCAL_AMFLAGS = -I build-aux/m4
22

33
lib_LTLIBRARIES = libsecp256k1.la
44
if USE_JNI
5-
JNI_LIB = librustsecp256k1_v0_1_0_jni.la
5+
JNI_LIB = librustsecp256k1_v0_1_1_jni.la
66
noinst_LTLIBRARIES = $(JNI_LIB)
77
else
88
JNI_LIB =
99
endif
1010
include_HEADERS = include/secp256k1.h
11-
include_HEADERS += include/rustsecp256k1_v0_1_0_preallocated.h
11+
include_HEADERS += include/rustsecp256k1_v0_1_1_preallocated.h
1212
noinst_HEADERS =
1313
noinst_HEADERS += src/scalar.h
1414
noinst_HEADERS += src/scalar_4x64.h
@@ -58,7 +58,7 @@ noinst_HEADERS += contrib/lax_der_privatekey_parsing.h
5858
noinst_HEADERS += contrib/lax_der_privatekey_parsing.c
5959

6060
if USE_EXTERNAL_ASM
61-
COMMON_LIB = librustsecp256k1_v0_1_0_common.la
61+
COMMON_LIB = librustsecp256k1_v0_1_1_common.la
6262
noinst_LTLIBRARIES = $(COMMON_LIB)
6363
else
6464
COMMON_LIB =
@@ -69,16 +69,16 @@ pkgconfig_DATA = libsecp256k1.pc
6969

7070
if USE_EXTERNAL_ASM
7171
if USE_ASM_ARM
72-
librustsecp256k1_v0_1_0_common_la_SOURCES = src/asm/field_10x26_arm.s
72+
librustsecp256k1_v0_1_1_common_la_SOURCES = src/asm/field_10x26_arm.s
7373
endif
7474
endif
7575

76-
librustsecp256k1_v0_1_0_la_SOURCES = src/secp256k1.c
77-
librustsecp256k1_v0_1_0_la_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES)
78-
librustsecp256k1_v0_1_0_la_LIBADD = $(JNI_LIB) $(SECP_LIBS) $(COMMON_LIB)
76+
librustsecp256k1_v0_1_1_la_SOURCES = src/secp256k1.c
77+
librustsecp256k1_v0_1_1_la_CPPFLAGS = -DSECP256K1_BUILD -I$(top_srcdir)/include -I$(top_srcdir)/src $(SECP_INCLUDES)
78+
librustsecp256k1_v0_1_1_la_LIBADD = $(JNI_LIB) $(SECP_LIBS) $(COMMON_LIB)
7979

80-
librustsecp256k1_v0_1_0_jni_la_SOURCES = src/java/org_bitcoin_NativeSecp256k1.c src/java/org_bitcoin_Secp256k1Context.c
81-
librustsecp256k1_v0_1_0_jni_la_CPPFLAGS = -DSECP256K1_BUILD $(JNI_INCLUDES)
80+
librustsecp256k1_v0_1_1_jni_la_SOURCES = src/java/org_bitcoin_NativeSecp256k1.c src/java/org_bitcoin_Secp256k1Context.c
81+
librustsecp256k1_v0_1_1_jni_la_CPPFLAGS = -DSECP256K1_BUILD $(JNI_INCLUDES)
8282

8383
noinst_PROGRAMS =
8484
if USE_BENCHMARK
@@ -161,7 +161,7 @@ gen_%.o: src/gen_%.c
161161
$(gen_context_BIN): $(gen_context_OBJECTS)
162162
$(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(LDFLAGS_FOR_BUILD) $^ -o $@
163163

164-
$(librustsecp256k1_v0_1_0_la_OBJECTS): src/ecmult_static_context.h
164+
$(librustsecp256k1_v0_1_1_la_OBJECTS): src/ecmult_static_context.h
165165
$(tests_OBJECTS): src/ecmult_static_context.h
166166
$(bench_internal_OBJECTS): src/ecmult_static_context.h
167167
$(bench_ecmult_OBJECTS): src/ecmult_static_context.h

secp256k1-sys/depend/secp256k1/configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ AC_ARG_ENABLE(external_default_callbacks,
140140
[use_external_default_callbacks=no])
141141

142142
AC_ARG_ENABLE(jni,
143-
AS_HELP_STRING([--enable-jni],[enable librustsecp256k1_v0_1_0_jni [default=no]]),
143+
AS_HELP_STRING([--enable-jni],[enable librustsecp256k1_v0_1_1_jni [default=no]]),
144144
[use_jni=$enableval],
145145
[use_jni=no])
146146

secp256k1-sys/depend/secp256k1/contrib/lax_der_parsing.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@
99

1010
#include "lax_der_parsing.h"
1111

12-
int rustsecp256k1_v0_1_0_ecdsa_signature_parse_der_lax(const rustsecp256k1_v0_1_0_context* ctx, rustsecp256k1_v0_1_0_ecdsa_signature* sig, const unsigned char *input, size_t inputlen) {
12+
int rustsecp256k1_v0_1_1_ecdsa_signature_parse_der_lax(const rustsecp256k1_v0_1_1_context* ctx, rustsecp256k1_v0_1_1_ecdsa_signature* sig, const unsigned char *input, size_t inputlen) {
1313
size_t rpos, rlen, spos, slen;
1414
size_t pos = 0;
1515
size_t lenbyte;
1616
unsigned char tmpsig[64] = {0};
1717
int overflow = 0;
1818

1919
/* Hack to initialize sig with a correctly-parsed but invalid signature. */
20-
rustsecp256k1_v0_1_0_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
20+
rustsecp256k1_v0_1_1_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
2121

2222
/* Sequence tag byte */
2323
if (pos == inputlen || input[pos] != 0x30) {
@@ -139,11 +139,11 @@ int rustsecp256k1_v0_1_0_ecdsa_signature_parse_der_lax(const rustsecp256k1_v0_1_
139139
}
140140

141141
if (!overflow) {
142-
overflow = !rustsecp256k1_v0_1_0_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
142+
overflow = !rustsecp256k1_v0_1_1_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
143143
}
144144
if (overflow) {
145145
memset(tmpsig, 0, 64);
146-
rustsecp256k1_v0_1_0_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
146+
rustsecp256k1_v0_1_1_ecdsa_signature_parse_compact(ctx, sig, tmpsig);
147147
}
148148
return 1;
149149
}

secp256k1-sys/depend/secp256k1/contrib/lax_der_parsing.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@
2626
* certain violations are easily supported. You may need to adapt it.
2727
*
2828
* Do not use this for new systems. Use well-defined DER or compact signatures
29-
* instead if you have the choice (see rustsecp256k1_v0_1_0_ecdsa_signature_parse_der and
30-
* rustsecp256k1_v0_1_0_ecdsa_signature_parse_compact).
29+
* instead if you have the choice (see rustsecp256k1_v0_1_1_ecdsa_signature_parse_der and
30+
* rustsecp256k1_v0_1_1_ecdsa_signature_parse_compact).
3131
*
3232
* The supported violations are:
3333
* - All numbers are parsed as nonnegative integers, even though X.609-0207
@@ -77,9 +77,9 @@ extern "C" {
7777
* encoded numbers are out of range, signature validation with it is
7878
* guaranteed to fail for every message and public key.
7979
*/
80-
int rustsecp256k1_v0_1_0_ecdsa_signature_parse_der_lax(
81-
const rustsecp256k1_v0_1_0_context* ctx,
82-
rustsecp256k1_v0_1_0_ecdsa_signature* sig,
80+
int rustsecp256k1_v0_1_1_ecdsa_signature_parse_der_lax(
81+
const rustsecp256k1_v0_1_1_context* ctx,
82+
rustsecp256k1_v0_1_1_ecdsa_signature* sig,
8383
const unsigned char *input,
8484
size_t inputlen
8585
) SECP256K1_ARG_NONNULL(1) SECP256K1_ARG_NONNULL(2) SECP256K1_ARG_NONNULL(3);

secp256k1-sys/depend/secp256k1/contrib/lax_der_privatekey_parsing.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
#include "lax_der_privatekey_parsing.h"
1111

12-
int ec_privkey_import_der(const rustsecp256k1_v0_1_0_context* ctx, unsigned char *out32, const unsigned char *privkey, size_t privkeylen) {
12+
int ec_privkey_import_der(const rustsecp256k1_v0_1_1_context* ctx, unsigned char *out32, const unsigned char *privkey, size_t privkeylen) {
1313
const unsigned char *end = privkey + privkeylen;
1414
int lenb = 0;
1515
int len = 0;
@@ -46,17 +46,17 @@ int ec_privkey_import_der(const rustsecp256k1_v0_1_0_context* ctx, unsigned char
4646
return 0;
4747
}
4848
memcpy(out32 + 32 - privkey[1], privkey + 2, privkey[1]);
49-
if (!rustsecp256k1_v0_1_0_ec_seckey_verify(ctx, out32)) {
49+
if (!rustsecp256k1_v0_1_1_ec_seckey_verify(ctx, out32)) {
5050
memset(out32, 0, 32);
5151
return 0;
5252
}
5353
return 1;
5454
}
5555

56-
int ec_privkey_export_der(const rustsecp256k1_v0_1_0_context *ctx, unsigned char *privkey, size_t *privkeylen, const unsigned char *key32, int compressed) {
57-
rustsecp256k1_v0_1_0_pubkey pubkey;
56+
int ec_privkey_export_der(const rustsecp256k1_v0_1_1_context *ctx, unsigned char *privkey, size_t *privkeylen, const unsigned char *key32, int compressed) {
57+
rustsecp256k1_v0_1_1_pubkey pubkey;
5858
size_t pubkeylen = 0;
59-
if (!rustsecp256k1_v0_1_0_ec_pubkey_create(ctx, &pubkey, key32)) {
59+
if (!rustsecp256k1_v0_1_1_ec_pubkey_create(ctx, &pubkey, key32)) {
6060
*privkeylen = 0;
6161
return 0;
6262
}
@@ -80,7 +80,7 @@ int ec_privkey_export_der(const rustsecp256k1_v0_1_0_context *ctx, unsigned char
8080
memcpy(ptr, key32, 32); ptr += 32;
8181
memcpy(ptr, middle, sizeof(middle)); ptr += sizeof(middle);
8282
pubkeylen = 33;
83-
rustsecp256k1_v0_1_0_ec_pubkey_serialize(ctx, ptr, &pubkeylen, &pubkey, SECP256K1_EC_COMPRESSED);
83+
rustsecp256k1_v0_1_1_ec_pubkey_serialize(ctx, ptr, &pubkeylen, &pubkey, SECP256K1_EC_COMPRESSED);
8484
ptr += pubkeylen;
8585
*privkeylen = ptr - privkey;
8686
} else {
@@ -105,7 +105,7 @@ int ec_privkey_export_der(const rustsecp256k1_v0_1_0_context *ctx, unsigned char
105105
memcpy(ptr, key32, 32); ptr += 32;
106106
memcpy(ptr, middle, sizeof(middle)); ptr += sizeof(middle);
107107
pubkeylen = 65;
108-
rustsecp256k1_v0_1_0_ec_pubkey_serialize(ctx, ptr, &pubkeylen, &pubkey, SECP256K1_EC_UNCOMPRESSED);
108+
rustsecp256k1_v0_1_1_ec_pubkey_serialize(ctx, ptr, &pubkeylen, &pubkey, SECP256K1_EC_UNCOMPRESSED);
109109
ptr += pubkeylen;
110110
*privkeylen = ptr - privkey;
111111
}

secp256k1-sys/depend/secp256k1/contrib/lax_der_privatekey_parsing.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ extern "C" {
5252
* simple 32-byte private keys are sufficient.
5353
*
5454
* Note that this function does not guarantee correct DER output. It is
55-
* guaranteed to be parsable by rustsecp256k1_v0_1_0_ec_privkey_import_der
55+
* guaranteed to be parsable by rustsecp256k1_v0_1_1_ec_privkey_import_der
5656
*/
5757
SECP256K1_WARN_UNUSED_RESULT int ec_privkey_export_der(
58-
const rustsecp256k1_v0_1_0_context* ctx,
58+
const rustsecp256k1_v0_1_1_context* ctx,
5959
unsigned char *privkey,
6060
size_t *privkeylen,
6161
const unsigned char *seckey,
@@ -77,7 +77,7 @@ SECP256K1_WARN_UNUSED_RESULT int ec_privkey_export_der(
7777
* key.
7878
*/
7979
SECP256K1_WARN_UNUSED_RESULT int ec_privkey_import_der(
80-
const rustsecp256k1_v0_1_0_context* ctx,
80+
const rustsecp256k1_v0_1_1_context* ctx,
8181
unsigned char *seckey,
8282
const unsigned char *privkey,
8383
size_t privkeylen

0 commit comments

Comments
 (0)