Skip to content

Commit

Permalink
Merge pull request wolfSSL#381 from danielinux/ecc_keygen_fix
Browse files Browse the repository at this point in the history
Fixed keygen ecc key initialization
  • Loading branch information
dgarske authored Oct 13, 2023
2 parents 426e7d2 + 8d7ed16 commit 5872b4d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tools/keytools/keygen.c
Original file line number Diff line number Diff line change
Expand Up @@ -403,6 +403,8 @@ static void keygen_ecc(const char *priv_fname, uint16_t ecc_key_size,
uint8_t k_buffer[2 * MAX_ECC_KEY_SIZE];
FILE *fpriv;

wc_ecc_init(&k);

if (wc_ecc_make_key(&rng, ecc_key_size, &k) != 0) {
fprintf(stderr, "Unable to create ecc key\n");
exit(1);
Expand Down
2 changes: 1 addition & 1 deletion tools/keytools/user_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#define WOLFCRYPT_ONLY

/* Math */
#if 1
#if 0
#define USE_FAST_MATH
#define FP_MAX_BITS (4096 * 2)
#else
Expand Down

0 comments on commit 5872b4d

Please sign in to comment.