Skip to content

Move TLS 1.2 PRF fallback logic to cryptobackend - #2513

Merged
Quim Muntal (qmuntal) merged 1 commit into
microsoft/mainfrom
dev/qmuntal/tls12-prf-fallback
Sep 23, 2026
Merged

Quim Muntal (qmuntal) merged 1 commit into
microsoft/mainfrom
dev/qmuntal/tls12-prf-fallback

Conversation

@qmuntal

Copy link
Copy Markdown
Member

Restore prf10 to upstream behavior by removing its system-crypto dispatch. Move TLS 1.2 PRF backend selection and Go fallback into cryptobackend/tls12, preserving native errors and the existing handshake error handling.

Master-secret derivation and TLS 1.3 are unchanged. No new tests are added.

Updates #2489.

Validation: existing PRF vector and local TLS 1.2 key-log tests with the system backend enabled and disabled, FIPS-enabled tests, the TLS 1.2 key-log test in FIPS-only mode, dependency checks, and standalone backend checks.

Restore prf10 to upstream behavior and move TLS 1.2 PRF backend
selection and Go fallback into cryptobackend/tls12. Preserve native
errors and leave master-secret derivation and handshake error
handling unchanged.

Updates #2489.
@qmuntal
Quim Muntal (qmuntal) requested a review from a team as a code owner September 22, 2026 15:00
Copilot AI lite review requested due to automatic review settings September 22, 2026 15:00
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

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 review overview

🟡 Changes recommended

Remove the stale crypto/internal/fips140/tls12 import from the patch to resolve the compile error.

Get a fresh assessment by requesting another Copilot review.

Review effort: Lite
Findings: 1 High severity

Open (1)
What changed in this PR

Moves TLS 1.2 PRF backend selection and fallback logic into cryptobackend/tls12, while restoring upstream TLS 1.0 behavior.

Changes:

  • Adds native and standard-library fallback dispatch.
  • Updates TLS integration and vendored backend patches.
  • Removes the obsolete initializer.
File Description
patches/​0002-Add-crypto-backends.patch Updates TLS PRF integration; retains an unused import causing a compile error.
patches/​0001-Vendor-external-dependencies.patch Vendors updated backend sources.
cryptobackend/​tls12/​tls12.go Adds PRF backend selection and fallback dispatch.
cryptobackend/​tls12/​tls12_windows.go Updates the Windows backend.
cryptobackend/​tls12/​tls12_openssl.go Updates the OpenSSL backend.
cryptobackend/​tls12/​tls12_nomsgostd.go Provides the standalone fallback stub.
cryptobackend/​tls12/​tls12_msgostd.go Connects to the standard-library fallback.
cryptobackend/​tls12/​tls12_darwin.go Provides the Darwin unsupported-backend stub.
cryptobackend/​tls12/​nobackend.go Provides disabled-backend stubs.
cryptobackend/​tls12/​init.go Removes the obsolete initializer.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread patches/0002-Add-crypto-backends.patch
@qmuntal
Quim Muntal (qmuntal) merged commit 49f77e7 into microsoft/main Sep 23, 2026
59 checks passed
@qmuntal
Quim Muntal (qmuntal) deleted the dev/qmuntal/tls12-prf-fallback branch September 23, 2026 08:18
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