File tree 3 files changed +12
-11
lines changed
3 files changed +12
-11
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
10
10
#### Added
11
11
- Added usage example for an ElligatorSwift key exchange.
12
12
13
+ #### Fixed
14
+ - Fixed compilation when the extrakeys module is disabled.
15
+
13
16
## [ 0.5.0] - 2024-05-06
14
17
15
18
#### Added
Original file line number Diff line number Diff line change @@ -6609,23 +6609,15 @@ static void permute(size_t *arr, size_t n) {
6609
6609
}
6610
6610
}
6611
6611
6612
- static void rand_pk (secp256k1_pubkey * pk ) {
6613
- unsigned char seckey [32 ];
6614
- secp256k1_keypair keypair ;
6615
- testrand256 (seckey );
6616
- CHECK (secp256k1_keypair_create (CTX , & keypair , seckey ) == 1 );
6617
- CHECK (secp256k1_keypair_pub (CTX , pk , & keypair ) == 1 );
6618
- }
6619
-
6620
6612
static void test_sort_api (void ) {
6621
6613
secp256k1_pubkey pks [2 ];
6622
6614
const secp256k1_pubkey * pks_ptr [2 ];
6623
6615
6624
6616
pks_ptr [0 ] = & pks [0 ];
6625
6617
pks_ptr [1 ] = & pks [1 ];
6626
6618
6627
- rand_pk (& pks [0 ]);
6628
- rand_pk (& pks [1 ]);
6619
+ testutil_random_pubkey_test (& pks [0 ]);
6620
+ testutil_random_pubkey_test (& pks [1 ]);
6629
6621
6630
6622
CHECK (secp256k1_ec_pubkey_sort (CTX , pks_ptr , 2 ) == 1 );
6631
6623
CHECK_ILLEGAL (CTX , secp256k1_ec_pubkey_sort (CTX , NULL , 2 ));
@@ -6678,7 +6670,7 @@ static void test_sort(void) {
6678
6670
int j ;
6679
6671
const secp256k1_pubkey * pk_ptr [5 ];
6680
6672
for (j = 0 ; j < 5 ; j ++ ) {
6681
- rand_pk (& pk [j ]);
6673
+ testutil_random_pubkey_test (& pk [j ]);
6682
6674
pk_ptr [j ] = & pk [j ];
6683
6675
}
6684
6676
secp256k1_ec_pubkey_sort (CTX , pk_ptr , 5 );
Original file line number Diff line number Diff line change @@ -107,6 +107,12 @@ static void testutil_random_gej_test(secp256k1_gej *gej) {
107
107
testutil_random_ge_jacobian_test (gej , & ge );
108
108
}
109
109
110
+ static void testutil_random_pubkey_test (secp256k1_pubkey * pk ) {
111
+ secp256k1_ge ge ;
112
+ testutil_random_ge_test (& ge );
113
+ secp256k1_pubkey_save (pk , & ge );
114
+ }
115
+
110
116
static void testutil_random_scalar_order_test (secp256k1_scalar * num ) {
111
117
do {
112
118
unsigned char b32 [32 ];
You can’t perform that action at this time.
0 commit comments