Skip to content

Check the SCR peer certificate after a resumed handshake - #11939

Open
holtrop-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
holtrop-wolfssl:zd22694-c
Open

holtrop-wolfssl wants to merge 1 commit into
wolfSSL:masterfrom
holtrop-wolfssl:zd22694-c

Conversation

@holtrop-wolfssl

Copy link
Copy Markdown
Contributor

Description

A resumed handshake has no Certificate message, so no peer certificate hash was cached and the first renegotiation of a resumed connection accepted any certificate, even one for a different subject.

Record in the session (and session ticket and serialized session) whether the peer sent a certificate and its hash, and restore it into the secure renegotiation state when a resumption is confirmed. A renegotiation of a resumed session that does not record this refuses any peer certificate with SCR_DIFFERENT_CERT_E. The peer certificate is now hashed whether or not renegotiation_info was negotiated, as a later resumption may negotiate it.

Fixes ZD#22694 issue C.

Testing

How did you test?

Checklist

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

A resumed handshake has no Certificate message, so no peer certificate
hash was cached and the first renegotiation of a resumed connection
accepted any certificate, even one for a different subject.

Record in the session (and session ticket and serialized session)
whether the peer sent a certificate and its hash, and restore it into
the secure renegotiation state when a resumption is confirmed. A
renegotiation of a resumed session that does not record this refuses
any peer certificate with SCR_DIFFERENT_CERT_E. The peer certificate is
now hashed whether or not renegotiation_info was negotiated, as a later
resumption may negotiate it.
@holtrop-wolfssl holtrop-wolfssl self-assigned this Oct 30, 2026
Copilot AI balanced review requested due to automatic review settings October 30, 2026 13:14

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@github-actions

github-actions Bot commented Oct 30, 2026 •

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

gcc-arm-cortex-m4-openssl-compat

  • FLASH: .text +384 B (+0.0%, 796,508 B / 1,048,576 B, total: 76% used)
  • RAM: .bss +240 B (+0.2%, 134,060 B / 262,144 B, total: 51% used)

gcc-arm-cortex-m4-rsa-only

  • FLASH: .text +256 B (+0.1%, 342,664 B / 1,048,576 B, total: 33% used)
  • RAM: .bss +1,320 B (+7.9%, 17,996 B / 262,144 B, total: 7% used)

zephyr-frdm_rw612

  • FLASH: log_const_area -8 B, rodata -8 B, text +1,600 B (+0.6%, 284,048 B / 67,108,864 B, total: 0% used)

No memory changes detected for:


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

@holtrop-wolfssl

Copy link
Copy Markdown
Contributor Author

retest this please

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.

3 participants