check RSA key size for PSS#10866
Merged
Merged
Conversation
|
Frauschi
reviewed
Jul 14, 2026
Frauschi
left a comment
Contributor
There was a problem hiding this comment.
🐺 Skoll Code Review
Overall recommendation: APPROVE
Findings: 4 total — 2 posted, 2 skipped
Posted findings
- [Medium] Key-size check only covers RSA-PSS/SHA-256, not SHA-384/SHA-512 —
src/internal.c:31129-31136 - [Low] Magic number 66 hardcoded instead of derived from WC_SHA256_DIGEST_SIZE —
src/internal.c:31065-31066
Skipped findings
- [Medium] No test added for the small-RSA-key PSS rejection path
- [Low] keySz is used as a proxy for emLen (loose by up to 1 byte)
Review generated by Skoll via Claude/Codex
Contributor
|
Jenkins retest this please. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Don't select RSA-PSS in MatchSigAlgo when the RSA key is too small for the signature.
When a TLS 1.2 server holds a small RSA certificate (e.g. 512bit) and the ClientHello's signature_algorithms extension offers rsa_pss_rsae_sha256 (0x0804), the handshake is aborted even though the client also offers rsa_pkcs1_sha256 (0x0401), which the key can use.
Fixes zd#22091
Testing
Local test with 512bit cert and run time SetMinRsaKey_Sz.
Checklist