-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement crypto/tls PRF using OpenSSL/CNG #1036
Merged
Merged
Conversation
This file contains 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
qmuntal
requested review from
microsoft-golang-review-bot and
a team
as code owners
September 8, 2023 14:11
qmuntal
commented
Sep 8, 2023
+ if version == "" { | ||
+ var fallbackVersion string | ||
+ var lcrypto string | ||
+ if version, _ := syscall.Getenv("GO_OPENSSL_VERSION_OVERRIDE"); version != "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to update this code because openssl.Init
now accepts a file path instead of a version suffix.
dagood
approved these changes
Sep 8, 2023
qmuntal
force-pushed
the
dev/qmuntal/tlsprf
branch
from
September 21, 2023 10:50
2987ab8
to
e950706
Compare
Submitted an OpenSSL PR to fix the CI failures: golang-fips/openssl#121. |
dagood
approved these changes
Sep 21, 2023
gdams
approved these changes
Sep 26, 2023
ueno
added a commit
to ueno/go-fips
that referenced
this pull request
Feb 15, 2024
For FIPS compliance, this offloads the PRF computation in TLS to OpenSSL, based on the work by Quim Muntal in: microsoft/go#1036 Note that, on RHEL-9, this may cause interoperability issue against the peers which do not use extended master secret, as described at: https://www.redhat.com/en/blog/tls-extended-master-secret-and-fips-rhel
ueno
added a commit
to ueno/go-fips
that referenced
this pull request
Feb 15, 2024
For FIPS compliance, this offloads the PRF computation in TLS to OpenSSL, based on the work by Quim Muntal in: microsoft/go#1036 Note that, on RHEL-9, this may cause interoperability issue against the peers which do not use extended master secret, yielding a connection close with internal_error alert. The way to mitigate that behavior is described at: https://www.redhat.com/en/blog/tls-extended-master-secret-and-fips-rhel
ueno
added a commit
to ueno/go-fips
that referenced
this pull request
Feb 15, 2024
For FIPS compliance, this offloads the PRF computation in TLS to OpenSSL, based on the work by Quim Muntal in: microsoft/go#1036 Note that, on RHEL-9, this may cause interoperability issue against the peers which do not use extended master secret, yielding a connection close with internal_error alert. The way to mitigate that behavior is described at: https://www.redhat.com/en/blog/tls-extended-master-secret-and-fips-rhel
ueno
added a commit
to ueno/go-fips
that referenced
this pull request
Feb 15, 2024
For FIPS compliance, this offloads the PRF computation in TLS to OpenSSL, based on the work by Quim Muntal in: microsoft/go#1036 Note that, on RHEL-9, this may cause interoperability issue against the peers which do not use extended master secret, yielding a connection close with internal_error alert. The way to mitigate that behavior is described at: https://www.redhat.com/en/blog/tls-extended-master-secret-and-fips-rhel
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.
This PR updates
crypto/tls
to implement PRF using OpenSSL/CNG instead of plain Go.The Go implementation doesn't return an error, but OpenSSL/CNG do. I had to update a bunch of functions so that the error is correctly handled.
I've also updated both backends to their latest versions, as TLS1PRF support landed soon in there.
The final implementation will probably change a bit once golang-fips/openssl#116 and microsoft/go-crypto-winnative#45 are merged, but I prefer to submit this now, get some reviews and let the pipeline exercise the new code.