Move TLS 1.2 PRF fallback logic to cryptobackend - #2513
Merged
Quim Muntal (qmuntal) merged 1 commit intoSep 23, 2026
Merged
Conversation
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.
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
Contributor
There was a problem hiding this comment.
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
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.
Quim Muntal (qmuntal)
enabled auto-merge
September 22, 2026 15:25
George Adams (gdams)
approved these changes
Sep 22, 2026
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.

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.