Skip to content

Implement ms_tls_config_schannel experiment#1844

Merged
qmuntal merged 5 commits into
microsoft/mainfrom
dev/qmuntal/tlsschannel
Aug 21, 2025
Merged

Implement ms_tls_config_schannel experiment#1844
qmuntal merged 5 commits into
microsoft/mainfrom
dev/qmuntal/tlsschannel

Conversation

@qmuntal
Copy link
Copy Markdown
Member

@qmuntal qmuntal commented Aug 19, 2025

This PR forward-ports the ms_tls_config_schannel feature from Go 1.23 to main.

For https://github.com/microsoft/go-lab/issues/215.

@qmuntal qmuntal requested a review from a team as a code owner August 19, 2025 13:18
@qmuntal qmuntal requested review from dagood, gdams and mertakman August 19, 2025 15:37
@dagood
Copy link
Copy Markdown
Member

dagood commented Aug 19, 2025

There are some notable changes from https://github.com/microsoft/go/blob/microsoft/release-branch.go1.23/patches/0016-implement-ms_tls_config_schannel-experiment.patch... any notes on that to make it easier to review?

@qmuntal
Copy link
Copy Markdown
Member Author

qmuntal commented Aug 20, 2025

There are some notable changes from https://github.com/microsoft/go/blob/microsoft/release-branch.go1.23/patches/0016-implement-ms_tls_config_schannel-experiment.patch... any notes on that to make it easier to review?

The functionality is the same, it has just been adapted to the code in master.

Copy link
Copy Markdown
Member

@dagood dagood left a comment

Choose a reason for hiding this comment

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

Essentially just formatting suggestions. 👍

Comment thread patches/0011-Implement-ms_tls_config_schannel-experiment.patch Outdated
Comment thread patches/0011-Implement-ms_tls_config_schannel-experiment.patch Outdated
Comment thread patches/0011-Implement-ms_tls_config_schannel-experiment.patch Outdated
+package tls
+
+func isSchannelCipherSuite(id uint16) bool {
+ return false
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

panic("unreachable") might more clearly match intent?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This function can be called from files not gated behind the ms_tls_config_schannel build tag, in which case it has to return false.

Copy link
Copy Markdown
Member

@dagood dagood Aug 21, 2025

Choose a reason for hiding this comment

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

It could be called, but it isn't called from anywhere when the experiment isn't active, right?

I don't understand why false makes sense here--to me that means "this isn't an algorithm schannel supports", but in this case we don't even know what schannel would support. I could see true making just as much sense depending on what this func is actually used for. (But it isn't used in either way, so... no context clues.)

A comment could clear it up fine if false really seems best.

+ }
+ })
+}
+func TestRemoveCipherSuiteCurvePrefix(t *testing.T) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Newline bewteen funcs, name doesn't match.

Suggested change
+func TestRemoveCipherSuiteCurvePrefix(t *testing.T) {
+
+func TestRemoveCipherSuiteCurveSuffix(t *testing.T) {

Comment thread patches/0011-Implement-ms_tls_config_schannel-experiment.patch Outdated
qmuntal and others added 2 commits August 21, 2025 08:58
Co-authored-by: Davis Goodin <dagood@users.noreply.github.com>
@qmuntal qmuntal merged commit f5fc235 into microsoft/main Aug 21, 2025
33 checks passed
@qmuntal qmuntal deleted the dev/qmuntal/tlsschannel branch August 21, 2025 08:20
qmuntal added a commit that referenced this pull request Aug 21, 2025
* Implement ms_tls_config_schannel experiment

* add ms_tls_config_schannel goexperiment to test matrix

* fix test

* Apply suggestions from code review

Co-authored-by: Davis Goodin <dagood@users.noreply.github.com>

* add newline

---------

Co-authored-by: Davis Goodin <dagood@users.noreply.github.com>
(cherry picked from commit f5fc235)
qmuntal added a commit that referenced this pull request Aug 21, 2025
* Implement ms_tls_config_schannel experiment

* add ms_tls_config_schannel goexperiment to test matrix

* fix test

* Apply suggestions from code review



* add newline

---------


(cherry picked from commit f5fc235)

Co-authored-by: Davis Goodin <dagood@users.noreply.github.com>
qmuntal added a commit that referenced this pull request Aug 21, 2025
* Implement ms_tls_config_schannel experiment

* add ms_tls_config_schannel goexperiment to test matrix

* fix test

* Apply suggestions from code review

* add newline

---------

(cherry picked from commit f5fc235)

Co-authored-by: Davis Goodin <dagood@users.noreply.github.com>
(cherry picked from commit e4796b0)
qmuntal added a commit that referenced this pull request Aug 21, 2025
…1844) (#1848)

* Implement ms_tls_config_schannel experiment (#1844) (#1847)

* Implement ms_tls_config_schannel experiment

* add ms_tls_config_schannel goexperiment to test matrix

* fix test

* Apply suggestions from code review

* add newline

---------

(cherry picked from commit f5fc235)

Co-authored-by: Davis Goodin <dagood@users.noreply.github.com>
(cherry picked from commit e4796b0)

* fix conflicts

* fix conflicts

---------

Co-authored-by: Davis Goodin <dagood@users.noreply.github.com>
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.

4 participants