Skip to content

Commit a2548a2

Browse files
terroprustyrussell
authored andcommittedAug 20, 2014
dumbwallet: better error messages for generating key
Running 'dumbwallet setup' on Fedora 21 gave me error "Coud not generate key". The reason is that Fedora's OpenSSL does not currently support secp256k1. This patch fixes the above typo and explains the user why the key generation failed. Signed-off-by: Tero Roponen <tero.roponen@gmail.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent 10e7c77 commit a2548a2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎dumbwallet.c

+3-1
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ static void create_wallet(const char *privkey)
6868
EC_KEY_set_conv_form(priv, POINT_CONVERSION_COMPRESSED);
6969
} else {
7070
priv = EC_KEY_new_by_curve_name(NID_secp256k1);
71+
if (!priv)
72+
errx(1, "OpenSSL in use misses support for secp256k1");
7173
if (EC_KEY_generate_key(priv) != 1)
72-
errx(1, "Coud not generate key");
74+
errx(1, "Could not generate key");
7375
}
7476
keystr = key_to_base58(NULL, true, priv, false);
7577

0 commit comments

Comments
 (0)
Please sign in to comment.