Commit 14689cd
committed
Fix ECC genkey default curve and sign test data size
- Default to P-256 when no curve name is given, so the EC_KEY group
NID is always set before EC_KEY_generate_key(). Without this,
wolfSSL_EC_KEY_new() leaves the group as WC_NID_undef and the
generated key's DER export is malformed.
- Increase test sign data from 15 to 20 bytes to meet wolfSSL's
WC_MIN_DIGEST_SIZE (16) requirement in wc_ecc_sign_hash().1 parent 804c93c commit 14689cd
2 files changed
Lines changed: 26 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
554 | 554 | | |
555 | 555 | | |
556 | 556 | | |
557 | | - | |
| 557 | + | |
558 | 558 | | |
559 | 559 | | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
560 | 563 | | |
561 | | - | |
562 | | - | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
563 | 567 | | |
564 | 568 | | |
565 | | - | |
| 569 | + | |
566 | 570 | | |
567 | 571 | | |
568 | 572 | | |
569 | 573 | | |
570 | | - | |
571 | | - | |
| 574 | + | |
572 | 575 | | |
573 | 576 | | |
574 | 577 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| |||
138 | 138 | | |
139 | 139 | | |
140 | 140 | | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
141 | 157 | | |
142 | 158 | | |
143 | 159 | | |
| |||
0 commit comments