aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Falbesoner <sebastian.falbesoner@gmail.com>2024-08-21 00:37:20 +0200
committerSebastian Falbesoner <sebastian.falbesoner@gmail.com>2024-08-21 00:41:56 +0200
commit60055f1abc4b4ad5f66a2fcf2e61c65efc777036 (patch)
treed3b920913e71445141e79f2b48d84f8ac12923b4
parentd79ea809d28197b1b4e3748aa1715272b53601d0 (diff)
test: replace deprecated secp256k1 context flags usage
The flags SECP256K1_CONTEXT_{SIGN,VERIFY} have been deprecated since libsecp256k1 version 0.2 (released in December 2022), with the recommendation to use SECP256K1_CONTEXT_NONE instead.
-rw-r--r--src/test/fuzz/secp256k1_ec_seckey_import_export_der.cpp2
-rw-r--r--src/test/key_tests.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/test/fuzz/secp256k1_ec_seckey_import_export_der.cpp b/src/test/fuzz/secp256k1_ec_seckey_import_export_der.cpp
index 0435626356..9f84ac9713 100644
--- a/src/test/fuzz/secp256k1_ec_seckey_import_export_der.cpp
+++ b/src/test/fuzz/secp256k1_ec_seckey_import_export_der.cpp
@@ -17,7 +17,7 @@ int ec_seckey_export_der(const secp256k1_context* ctx, unsigned char* seckey, si
FUZZ_TARGET(secp256k1_ec_seckey_import_export_der)
{
FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
- secp256k1_context* secp256k1_context_sign = secp256k1_context_create(SECP256K1_CONTEXT_SIGN);
+ secp256k1_context* secp256k1_context_sign = secp256k1_context_create(SECP256K1_CONTEXT_NONE);
{
std::vector<uint8_t> out32(32);
(void)ec_seckey_import_der(secp256k1_context_sign, out32.data(), ConsumeFixedLengthByteVector(fuzzed_data_provider, CKey::SIZE).data(), CKey::SIZE);
diff --git a/src/test/key_tests.cpp b/src/test/key_tests.cpp
index 112d6db193..d0f9ef8161 100644
--- a/src/test/key_tests.cpp
+++ b/src/test/key_tests.cpp
@@ -362,7 +362,7 @@ BOOST_AUTO_TEST_CASE(bip341_test_h)
BOOST_AUTO_TEST_CASE(key_schnorr_tweak_smoke_test)
{
// Sanity check to ensure we get the same tweak using CPubKey vs secp256k1 functions
- secp256k1_context* secp256k1_context_sign = secp256k1_context_create(SECP256K1_CONTEXT_SIGN);
+ secp256k1_context* secp256k1_context_sign = secp256k1_context_create(SECP256K1_CONTEXT_NONE);
CKey key;
key.MakeNewKey(true);