Commit 89dac98
committed
fix d2iTryAltDhKey short-circuiting the d2i probe chain
When wc_DhKeyDecode() rejected the input, d2iTryAltDhKey() returned 0
after freeing the DH object. d2i_evp_pkey_try() treats any value >= 0
as success, so a non-DH input would stop the probe chain at the DH
step and never reach the Falcon, Dilithium, Ed25519, or Ed448 probes
that follow. d2i_PUBKEY()/d2i_PrivateKey() consequently returned NULL
for any key type past DH in the chain.1 parent 97f1e44 commit 89dac98
1 file changed
Lines changed: 10 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
404 | 404 | | |
405 | 405 | | |
406 | 406 | | |
407 | | - | |
| 407 | + | |
| 408 | + | |
408 | 409 | | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
418 | 417 | | |
419 | 418 | | |
420 | 419 | | |
421 | 420 | | |
422 | 421 | | |
423 | 422 | | |
424 | | - | |
| 423 | + | |
425 | 424 | | |
426 | 425 | | |
427 | 426 | | |
| |||
0 commit comments