-
-
Notifications
You must be signed in to change notification settings - Fork 179
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
Add OpenSSL 3.x support to openssl-dynamic #867
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
Motivation: The `openssl-dynamic` module only compiles against OpenSSL 1.x. Modifications: The most significant change is that one no longer needs to provide DH parameters manually. By calling `SSL_CTX_set_dh_auto()`, OpenSSL will use the built-in parameters that match the key pair size. E.g. RSA 2048 will use DH 2048 and so on. The property `jdk.tls.ephemeralDHKeySize`, which was used to affect the size of the DH parameters before, will be ignored when using the dynamically linked OpenSSL. Instead, the system OpenSSL library's config will be used. Another change is how FIPS is managed because OpenSSL 3 introduces a "Provider" concept. The `FIPS_mode_set` is removed and is now replaced with `EVP_default_properties_enable_fips` which instructs OpenSSL to load the FIPS compliant provider, if no provider is explicitly requested. Result: The `openssl-dynamic` module can now successfully compile and run with OpenSSL 3.x.
@klaren thanks a lot for the contribution... Did you sign our ICLA yet, https://netty.io/s/icla ? |
@normanmaurer yes, I signed it just before I created the PR. |
@klaren can you please check the build failures: https://github.com/netty/netty-tcnative/actions/runs/8658366916/job/23968334532?pr=867 ? |
@normanmaurer Minor typo, should be fixed now. |
Thanks a lot @klaren |
jennyowen
pushed a commit
to jennyowen/netty-tcnative
that referenced
this pull request
Jul 25, 2024
### Motivation: The `openssl-dynamic` module only compiles against OpenSSL 1.x. ### Modifications: The most significant change is that one no longer needs to provide DH parameters manually. By calling `SSL_CTX_set_dh_auto()`, OpenSSL will use the built-in parameters that match the key pair size. E.g. RSA 2048 will use DH 2048 and so on. The property `jdk.tls.ephemeralDHKeySize`, which was used to affect the size of the DH parameters before, will be ignored when using the dynamically linked OpenSSL. Instead, the system OpenSSL library's config will be used. Another change is how FIPS is managed because OpenSSL 3 introduces a "Provider" concept. The `FIPS_mode_set` is removed and is now replaced with `EVP_default_properties_enable_fips` which instructs OpenSSL to load the FIPS compliant provider, if no provider is explicitly requested. ### Result: The `openssl-dynamic` module can now successfully compile and run with OpenSSL 3.x.
jennyowen
pushed a commit
to jennyowen/netty-tcnative
that referenced
this pull request
Jul 26, 2024
### Motivation: The `openssl-dynamic` module only compiles against OpenSSL 1.x. ### Modifications: The most significant change is that one no longer needs to provide DH parameters manually. By calling `SSL_CTX_set_dh_auto()`, OpenSSL will use the built-in parameters that match the key pair size. E.g. RSA 2048 will use DH 2048 and so on. The property `jdk.tls.ephemeralDHKeySize`, which was used to affect the size of the DH parameters before, will be ignored when using the dynamically linked OpenSSL. Instead, the system OpenSSL library's config will be used. Another change is how FIPS is managed because OpenSSL 3 introduces a "Provider" concept. The `FIPS_mode_set` is removed and is now replaced with `EVP_default_properties_enable_fips` which instructs OpenSSL to load the FIPS compliant provider, if no provider is explicitly requested. ### Result: The `openssl-dynamic` module can now successfully compile and run with OpenSSL 3.x.
jennyowen
pushed a commit
to jennyowen/netty-tcnative
that referenced
this pull request
Jul 29, 2024
### Motivation: The `openssl-dynamic` module only compiles against OpenSSL 1.x. ### Modifications: The most significant change is that one no longer needs to provide DH parameters manually. By calling `SSL_CTX_set_dh_auto()`, OpenSSL will use the built-in parameters that match the key pair size. E.g. RSA 2048 will use DH 2048 and so on. The property `jdk.tls.ephemeralDHKeySize`, which was used to affect the size of the DH parameters before, will be ignored when using the dynamically linked OpenSSL. Instead, the system OpenSSL library's config will be used. Another change is how FIPS is managed because OpenSSL 3 introduces a "Provider" concept. The `FIPS_mode_set` is removed and is now replaced with `EVP_default_properties_enable_fips` which instructs OpenSSL to load the FIPS compliant provider, if no provider is explicitly requested. ### Result: The `openssl-dynamic` module can now successfully compile and run with OpenSSL 3.x.
jennyowen
pushed a commit
to jennyowen/netty-tcnative
that referenced
this pull request
Jul 29, 2024
### Motivation: The `openssl-dynamic` module only compiles against OpenSSL 1.x. ### Modifications: The most significant change is that one no longer needs to provide DH parameters manually. By calling `SSL_CTX_set_dh_auto()`, OpenSSL will use the built-in parameters that match the key pair size. E.g. RSA 2048 will use DH 2048 and so on. The property `jdk.tls.ephemeralDHKeySize`, which was used to affect the size of the DH parameters before, will be ignored when using the dynamically linked OpenSSL. Instead, the system OpenSSL library's config will be used. Another change is how FIPS is managed because OpenSSL 3 introduces a "Provider" concept. The `FIPS_mode_set` is removed and is now replaced with `EVP_default_properties_enable_fips` which instructs OpenSSL to load the FIPS compliant provider, if no provider is explicitly requested. ### Result: The `openssl-dynamic` module can now successfully compile and run with OpenSSL 3.x.
jennyowen
pushed a commit
to jennyowen/netty-tcnative
that referenced
this pull request
Jul 30, 2024
### Motivation: The `openssl-dynamic` module only compiles against OpenSSL 1.x. ### Modifications: The most significant change is that one no longer needs to provide DH parameters manually. By calling `SSL_CTX_set_dh_auto()`, OpenSSL will use the built-in parameters that match the key pair size. E.g. RSA 2048 will use DH 2048 and so on. The property `jdk.tls.ephemeralDHKeySize`, which was used to affect the size of the DH parameters before, will be ignored when using the dynamically linked OpenSSL. Instead, the system OpenSSL library's config will be used. Another change is how FIPS is managed because OpenSSL 3 introduces a "Provider" concept. The `FIPS_mode_set` is removed and is now replaced with `EVP_default_properties_enable_fips` which instructs OpenSSL to load the FIPS compliant provider, if no provider is explicitly requested. ### Result: The `openssl-dynamic` module can now successfully compile and run with OpenSSL 3.x.
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.
Motivation:
The
openssl-dynamic
module only compiles against OpenSSL 1.x.Modifications:
The most significant change is that one no longer needs to provide DH parameters manually. By calling
SSL_CTX_set_dh_auto()
, OpenSSL will use the built-in parameters that match the key pair size. E.g. RSA 2048 will use DH 2048 and so on.The property
jdk.tls.ephemeralDHKeySize
, which was used to affect the size of the DH parameters before, will be ignored when using the dynamically linked OpenSSL. Instead, the system OpenSSL library's config will be used.Another change is how FIPS is managed because OpenSSL 3 introduces a "Provider" concept. The
FIPS_mode_set
is removed and is now replaced withEVP_default_properties_enable_fips
which instructs OpenSSL to load the FIPS compliant provider, if no provider is explicitly requested.Result:
The
openssl-dynamic
module can now successfully compile and run with OpenSSL 3.x.This only makes the necessary changes to the code. There is still the question of how this should be published(if at all?) since it has to be a separate artifact from the 1.x version. Some alternatives I see are
openssl3-dynamic
module.