PRIO (Testfix included): CustomKeyAndCertificateFactorySupplier added #1030
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.
What problem is adressed?
I want to gain greater control over the SSL-Certificates used.
What is the solution
Just provide a custom supplier for a custom implementation of a KeyAndCertificateFactory.
What other solutions were discarded?
In keeping with Configuration-Approach more commonly used in Mockserver I first thought of introducing a new property for this case. Best I could come up with would be the class name, then just instantiate the given class in the KeyAndCertificateFactoryFactory, similiar to how this is done with BouncyCastle.
However this makes it impossible to have good control over the configuration of the Factory: The constructor will always be called only with MockserverLogger as the only argument. If there ever would be more then one MockServer in the same VM the use of constants to configure the instances of the Factories would not be possible anymore (and it would be a misleading design-choice to begin with)
What else?
This PR solves the long persisting build issues by updating the certificates used in the tests. To make it easier for future-me I updated the MD describing the fix to include the critical udpate on the keychain.