Skip to content

Commit 60055f1

Browse files
committed
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.
1 parent d79ea80 commit 60055f1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/test/fuzz/secp256k1_ec_seckey_import_export_der.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ int ec_seckey_export_der(const secp256k1_context* ctx, unsigned char* seckey, si
1717
FUZZ_TARGET(secp256k1_ec_seckey_import_export_der)
1818
{
1919
FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
20-
secp256k1_context* secp256k1_context_sign = secp256k1_context_create(SECP256K1_CONTEXT_SIGN);
20+
secp256k1_context* secp256k1_context_sign = secp256k1_context_create(SECP256K1_CONTEXT_NONE);
2121
{
2222
std::vector<uint8_t> out32(32);
2323
(void)ec_seckey_import_der(secp256k1_context_sign, out32.data(), ConsumeFixedLengthByteVector(fuzzed_data_provider, CKey::SIZE).data(), CKey::SIZE);

src/test/key_tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ BOOST_AUTO_TEST_CASE(bip341_test_h)
362362
BOOST_AUTO_TEST_CASE(key_schnorr_tweak_smoke_test)
363363
{
364364
// Sanity check to ensure we get the same tweak using CPubKey vs secp256k1 functions
365-
secp256k1_context* secp256k1_context_sign = secp256k1_context_create(SECP256K1_CONTEXT_SIGN);
365+
secp256k1_context* secp256k1_context_sign = secp256k1_context_create(SECP256K1_CONTEXT_NONE);
366366

367367
CKey key;
368368
key.MakeNewKey(true);

0 commit comments

Comments
 (0)