mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-27 03:33:27 -03:00
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.
This commit is contained in:
parent
d79ea809d2
commit
60055f1abc
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
FUZZ_TARGET(secp256k1_ec_seckey_import_export_der)
|
||||||
{
|
{
|
||||||
FuzzedDataProvider fuzzed_data_provider{buffer.data(), buffer.size()};
|
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);
|
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);
|
(void)ec_seckey_import_der(secp256k1_context_sign, out32.data(), ConsumeFixedLengthByteVector(fuzzed_data_provider, CKey::SIZE).data(), CKey::SIZE);
|
||||||
|
|
|
@ -362,7 +362,7 @@ BOOST_AUTO_TEST_CASE(bip341_test_h)
|
||||||
BOOST_AUTO_TEST_CASE(key_schnorr_tweak_smoke_test)
|
BOOST_AUTO_TEST_CASE(key_schnorr_tweak_smoke_test)
|
||||||
{
|
{
|
||||||
// Sanity check to ensure we get the same tweak using CPubKey vs secp256k1 functions
|
// 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;
|
CKey key;
|
||||||
key.MakeNewKey(true);
|
key.MakeNewKey(true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue