@@ -174,38 +174,6 @@ static bool _pubkeys_equal(
174
174
return memcmp (pubkey1_bytes , pubkey2_bytes , len ) == 0 ;
175
175
}
176
176
177
- static void _test_keystore_get_xpub (void * * state )
178
- {
179
- const secp256k1_context * ctx = wally_get_secp_context ();
180
-
181
- struct ext_key xpub = {0 };
182
-
183
- _mock_unlocked (NULL , 0 , NULL );
184
- // fails because keystore is locked
185
- assert_false (keystore_get_xpub (_keypath , sizeof (_keypath ) / sizeof (uint32_t ), & xpub ));
186
-
187
- _mock_unlocked (_mock_seed , sizeof (_mock_seed ), _mock_bip39_seed );
188
- assert_true (keystore_get_xpub (_keypath , sizeof (_keypath ) / sizeof (uint32_t ), & xpub ));
189
-
190
- secp256k1_pubkey expected_pubkey ;
191
- assert_true (secp256k1_ec_pubkey_create (ctx , & expected_pubkey , _expected_seckey ));
192
-
193
- secp256k1_pubkey pubkey ;
194
- assert_true (secp256k1_ec_pubkey_parse (ctx , & pubkey , xpub .pub_key , sizeof (xpub .pub_key )));
195
-
196
- assert_true (_pubkeys_equal (ctx , & pubkey , & expected_pubkey ));
197
-
198
- char * xpub_string ;
199
- // Make sure it's a public key, no
200
- assert_false (bip32_key_to_base58 (& xpub , BIP32_FLAG_KEY_PRIVATE , & xpub_string ) == WALLY_OK );
201
- assert_true (bip32_key_to_base58 (& xpub , BIP32_FLAG_KEY_PUBLIC , & xpub_string ) == WALLY_OK );
202
- assert_string_equal (
203
- xpub_string ,
204
- "xpub6Gmp9vKrJrVbU5JDcPRm6UmJPjTBurWfqow6w3BoK46E6mVyScMfTXd66WFeLfRa7Ug4iGMWDpWLpZAYcuUHyz"
205
- "cWZCqh8393rbuMoerRK1p" );
206
- wally_free_string (xpub_string );
207
- }
208
-
209
177
static void _test_keystore_secp256k1_nonce_commit (void * * state )
210
178
{
211
179
uint8_t msg [32 ] = {0 };
@@ -603,7 +571,6 @@ int main(void)
603
571
mock_memory_set_salt_root (_salt_root );
604
572
605
573
const struct CMUnitTest tests [] = {
606
- cmocka_unit_test (_test_keystore_get_xpub ),
607
574
cmocka_unit_test (_test_keystore_secp256k1_nonce_commit ),
608
575
cmocka_unit_test (_test_keystore_secp256k1_sign ),
609
576
cmocka_unit_test (_test_keystore_encrypt_and_store_seed ),
0 commit comments