Repository navigation
Commit ff0b5e2
Enforce the RSA key size floor on host keys
ParseRSAPubKey() and ParseRSAPubKeyCert() run the server's host key
through CheckRsaKeyBits(), so a client rejects an RSA host key under
WOLFSSH_RSA_MIN_KEY_BITS the same way a server rejects a short user
auth key. The failure ends the key exchange in DoKexDhReply().
- move CheckRsaKeyBits() above the host key parsers
- ParseRSAPubKey() maps only the decode failure to WS_RSA_E, so a
parse error or a short key keeps its own code
- test 1024 and 2047 bit host keys in test_ParseRSAPubKey()
Issue: F-146871 parent ba0a8c2 commit ff0b5e2
3 files changed
Lines changed: 55 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7595 | 7595 | | |
7596 | 7596 | | |
7597 | 7597 | | |
| 7598 | + | |
| 7599 | + | |
| 7600 | + | |
| 7601 | + | |
| 7602 | + | |
| 7603 | + | |
| 7604 | + | |
| 7605 | + | |
| 7606 | + | |
| 7607 | + | |
| 7608 | + | |
| 7609 | + | |
| 7610 | + | |
| 7611 | + | |
| 7612 | + | |
| 7613 | + | |
| 7614 | + | |
| 7615 | + | |
| 7616 | + | |
| 7617 | + | |
| 7618 | + | |
| 7619 | + | |
| 7620 | + | |
| 7621 | + | |
7598 | 7622 | | |
7599 | 7623 | | |
7600 | 7624 | | |
| |||
7627 | 7651 | | |
7628 | 7652 | | |
7629 | 7653 | | |
| 7654 | + | |
| 7655 | + | |
7630 | 7656 | | |
| 7657 | + | |
| 7658 | + | |
7631 | 7659 | | |
7632 | | - | |
| 7660 | + | |
7633 | 7661 | | |
7634 | 7662 | | |
7635 | | - | |
7636 | | - | |
7637 | 7663 | | |
7638 | 7664 | | |
7639 | 7665 | | |
| |||
8102 | 8128 | | |
8103 | 8129 | | |
8104 | 8130 | | |
| 8131 | + | |
| 8132 | + | |
8105 | 8133 | | |
8106 | 8134 | | |
8107 | 8135 | | |
| |||
10437 | 10465 | | |
10438 | 10466 | | |
10439 | 10467 | | |
10440 | | - | |
10441 | | - | |
10442 | | - | |
10443 | | - | |
10444 | | - | |
10445 | | - | |
10446 | | - | |
10447 | | - | |
10448 | | - | |
10449 | | - | |
10450 | | - | |
10451 | | - | |
10452 | | - | |
10453 | | - | |
10454 | | - | |
10455 | | - | |
10456 | | - | |
10457 | | - | |
10458 | | - | |
10459 | | - | |
10460 | | - | |
10461 | | - | |
10462 | 10468 | | |
10463 | 10469 | | |
10464 | 10470 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22857 | 22857 | | |
22858 | 22858 | | |
22859 | 22859 | | |
22860 | | - | |
| 22860 | + | |
22861 | 22861 | | |
22862 | | - | |
| 22862 | + | |
| 22863 | + | |
| 22864 | + | |
| 22865 | + | |
| 22866 | + | |
| 22867 | + | |
| 22868 | + | |
| 22869 | + | |
| 22870 | + | |
| 22871 | + | |
| 22872 | + | |
| 22873 | + | |
| 22874 | + | |
| 22875 | + | |
| 22876 | + | |
| 22877 | + | |
| 22878 | + | |
| 22879 | + | |
| 22880 | + | |
| 22881 | + | |
| 22882 | + | |
22863 | 22883 | | |
22864 | 22884 | | |
22865 | 22885 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
719 | 719 | | |
720 | 720 | | |
721 | 721 | | |
722 | | - | |
| 722 | + | |
| 723 | + | |
723 | 724 | | |
724 | 725 | | |
725 | 726 | | |
| |||
0 commit comments