Repository navigation
Conversation
markt-asf
added a commit
that referenced
this pull request
Mar 28, 2025
Based on PR #805 by Hakky54.
markt-asf
added a commit
that referenced
this pull request
Mar 28, 2025
Based on PR #805 by Hakky54.
markt-asf
added a commit
that referenced
this pull request
Mar 28, 2025
Based on PR #805 by Hakky54.
markt-asf
added a commit
that referenced
this pull request
Mar 28, 2025
Based on PR #805 by Hakky54.
Contributor
|
Thanks for the PR. I applied it manually so I could add a few Javadoc comments and a change log entry. |
Author
|
Amazing, thank you mate. I really appreciate it |
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.
This PR is a followup of the following earlier PR #673 Although that pull request didn't get merged, the code changes has been comitted to the main branch by the main developer, see here for the specific commit: b0df981
Context
With the earlier commit it is now possible to programatically configure the ssl configuration of tomcat instead of using properties and delegating to tomcat to construct the ssl configuration. This opens the possibility of reloading the ssl configuration or other customizations as shown also here: sslcontext-kickstart
Problem statement
Boilerplate code is needed by the end-user to provide a custom ssl configuration. Tomcat takes a custom SSLContext, the full name is
org.apache.tomcat.util.net.SSLContextwhile the end-user hasjavax.net.ssl.SSLContext. So the end-user is required to create an implementation oforg.apache.tomcat.util.net.SSLContextwhich acts as a wrapper. This sslcontext needs to be passed toSSLHostConfigCertificateto further configure the server.Solution
Provide a helper class which acts as a wrapper to reduce the boilerplate code. The utility interface is able to provide a method to wrap the required objects, in this case
javax.net.ssl.SSLContext, KeyManager, TrustManager in aorg.apache.tomcat.util.net.SSLContextExample usage
Below is an example usage with Spring Boot and Tomcat
In the past I created the same PR, but I assumed it would not get merged and therefor I gave up and closed the PR. But I still think it is useful and decided the recreate the PR to give it another shot. Looking forward to your feedback and decision for this PR.