Skip to content

TLS: use rsa_pss_pss_* with id-RSASSA-PSS keys - #12004

Open
jackctj117 wants to merge 1 commit into
wolfSSL:masterfrom
jackctj117:rsa-pss-pss-sigalg-11988
Open

jackctj117 wants to merge 1 commit into
wolfSSL:masterfrom
jackctj117:rsa-pss-pss-sigalg-11988

Conversation

@jackctj117

Copy link
Copy Markdown
Contributor

Pick, label and check RSA-PSS signature schemes by the key's OID in TLS 1.2 and 1.3, honour the key's PSS parameters, and accept rsa_pss_pss_* in a TLS 1.2 CertificateVerify. Wire rsapss.test into make check and add a unit test.

Fixes #11988

Description

Please describe the scope of the fix or feature addition.

Fixes zd#

Testing

How did you test?

Checklist

  • added tests
  • updated/added doxygen
  • updated appropriate READMEs
  • Updated manual and documentation

Copilot AI balanced review requested due to automatic review settings November 4, 2026 22:51
@github-actions

github-actions Bot commented Nov 4, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

gcc-arm-cortex-m4-dtls13

  • FLASH: .text -64 B (-0.0%, 196,440 B / 1,048,576 B, total: 19% used)

gcc-arm-cortex-m4-openssl-compat

  • FLASH: .rodata +48 B, .text +768 B (+0.1%, 802,932 B / 1,048,576 B, total: 77% used)
  • RAM: .data +16 B (+0.0%, 121,788 B / 262,144 B, total: 46% used)

gcc-arm-cortex-m4-pq

  • FLASH: .text +448 B (+0.1%, 313,872 B / 1,048,576 B, total: 30% used)

gcc-arm-cortex-m4-rsa-only

  • FLASH: .text +512 B (+0.1%, 344,464 B / 1,048,576 B, total: 33% used)

gcc-arm-cortex-m4-tls13

  • FLASH: .text +384 B (+0.2%, 250,530 B / 262,144 B, total: 96% used)

gcc-arm-cortex-m7-pq

  • FLASH: .text +448 B (+0.1%, 314,704 B / 1,048,576 B, total: 30% used)

gcc-arm-cortex-m7-tls13

  • FLASH: .text +384 B (+0.2%, 250,530 B / 262,144 B, total: 96% used)

stm32-sim-stm32h753

  • FLASH: .text +440 B (+0.2%, 204,908 B / 2,097,152 B, total: 10% used)

zephyr-frdm_rw612

  • FLASH: datas +16 B, log_const_area -8 B, rodata +36 B, text +11,712 B (+4.2%, 294,220 B / 67,108,864 B, total: 0% used)
  • RAM: bss +49 B, datas +16 B (+0.1%, 58,423 B / 983,040 B, total: 6% used)

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

RSA-PSS handling can bypass key restrictions and ignores MGF constraints, while new tests fail on supported OpenSSL versions and hash configurations.

7 open issues
What changed in this PR

This PR addresses #11988 by aligning wolfSSL’s RSA-PSS signature selection and validation with certificate key types across TLS 1.2 and 1.3, including shared DTLS paths.

Changes:

  • Distinguishes rsa_pss_rsae_* from rsa_pss_pss_* during negotiation, encoding, and verification.
  • Carries certificate PSS hash and salt parameters into TLS state for compatibility checks.
  • Adds API regression tests, expands OpenSSL interoperability cases, and registers rsapss.test with make check.
File Description
wolfssl/​wolfcrypt/​asn.h Adds decoded PSS key parameter fields.
wolfssl/​internal.h Adds TLS PSS state and a peer-validation declaration.
wolfcrypt/​src/​asn.c Retains parsed PSS hash and salt parameters.
tests/​api.c Adds RSA-PSS negotiation and mutual-authentication tests.
src/​tls13.c Updates TLS 1.3 scheme encoding and peer validation.
src/​ssl_load.c Copies certificate PSS parameters into TLS state.
src/​internal.c Updates scheme selection, signing, and verification.
scripts/​rsapss.test Expands TLS/DTLS interoperability and rejection cases.
scripts/​include.am Registers RSA-PSS interoperability tests.

Review effort: Balanced

Comment thread scripts/rsapss.test Resolved
Comment thread src/internal.c Resolved
Comment thread wolfcrypt/src/asn.c Resolved
Comment thread scripts/rsapss.test Resolved
Comment thread src/internal.c Resolved
Comment thread tests/api.c Resolved
Comment thread tests/api.c Resolved
@jackctj117

Copy link
Copy Markdown
Contributor Author

@claude review

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Findings marked 🟡 are optional suggestions and need no follow-up push.

Comment thread src/internal.c Resolved
Comment thread src/internal.c Resolved
Comment thread src/ssl_load.c Resolved
Comment thread src/tls13.c Resolved
Comment thread src/internal.c Resolved
Comment thread src/internal.c Resolved

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #12004

Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): scripts/include.am, scripts/rsapss.test
Coverage: 6 of 7 in-scope changed file(s) opened by the reviewer; not opened: wolfssl/wolfcrypt/asn.h

Findings: 3
3 finding(s) posted as inline comments (see file-level comments below)

This review was generated automatically by Fenrir. Reported findings require changes before merge.

Review tier: Max

Comment thread src/internal.c Resolved
Comment thread src/internal.c Resolved
Comment thread tests/api.c Resolved
@jackctj117
jackctj117 force-pushed the rsa-pss-pss-sigalg-11988 branch from 8ccebf8 to 5286e64 Compare November 5, 2026 17:01
@jackctj117

jackctj117 commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor Author

Jenkins retest please. .

@jackctj117
jackctj117 force-pushed the rsa-pss-pss-sigalg-11988 branch from e7f4710 to 2189026 Compare November 10, 2026 21:41
@jackctj117

Copy link
Copy Markdown
Contributor Author

Jenkins retest this please

Pick, label and check RSA-PSS signature schemes by the key's OID in
TLS 1.2 and 1.3, hold every candidate to the key's hash, MGF and salt
length (RFC 4055 3.3), carry those parameters through every key install
path, accept rsa_pss_pss_* in a TLS 1.2 CertificateVerify, and pass over
RSA key transport suites and a ClientHello without signature_algorithms
when the key only signs (RFC 4055 1.2).

Wire rsapss.test into make check, reading the scheme off the wire from
OpenSSL 1.1.1 and 3, and add a unit test.

Fixes wolfSSL#11988
@jackctj117
jackctj117 force-pushed the rsa-pss-pss-sigalg-11988 branch from 2189026 to ea0b6bf Compare November 11, 2026 21:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Unresolved TLS 1.2 RSA-PSS client-authentication flaws can select unoffered or key-incompatible signature schemes, while missing SHA-256 guards cause new tests to fail in supported configurations.

1 open issue
7 resolved since last review

Review effort: Balanced

Comment thread scripts/rsapss.test
SVR_TLS12=no
SVR_DTLS12=no
fi
HAVE_SHA384=no

@wolfSSL-Fenrir-bot wolfSSL-Fenrir-bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fenrir Automated Review — PR #12004

Scan targets checked: wolfcrypt-src, wolfcrypt-bugs, wolfssl-src, wolfssl-bugs
Not reviewed (no scan target covers them): scripts/include.am, scripts/rsapss.test
Coverage: 5 of 8 in-scope changed file(s) opened by the reviewer; not opened: src/ssl.c, tests/api.c, wolfssl/wolfcrypt/asn.h

Fenrir result: Approved ✅

No new issues found in the changed files.

Advisory only — this automated result does not count as a GitHub approval.

Review tier: Lite

@wolfSSL-Fenrir-bot
wolfSSL-Fenrir-bot dismissed their stale review November 11, 2026 21:39

Fenrir's latest completed scan found no issues; clearing the prior automated change request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Wrong rsa_pss_pss_* handling for id-RSASSA-PSS keys in (D)TLS 1.2 and 1.3

4 participants