Skip to content
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

PRIO (Testfix included): CustomKeyAndCertificateFactorySupplier added #1030

Merged
merged 8 commits into from
Jan 18, 2022

Conversation

Arkinator
Copy link
Contributor

@Arkinator Arkinator commented May 31, 2021

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.

@Arkinator Arkinator changed the title CustomKeyAndCertificateFactorySupplier added PRIO (Testfix included): CustomKeyAndCertificateFactorySupplier added Jun 1, 2021
@candrews
Copy link

@jamesdbloom this PR fixes the longstanding test failures by the buildkite CI system which is causing all submitted PRs to fail, such as #1008

@Arkinator
Copy link
Contributor Author

Since I needed this PR I forked the project: https://search.maven.org/artifact/io.github.arkinator/mockserver/5.11.3/pom
I am not planning to upkeeping that repository and would love for this PR to be merged and the fork to die.

@jamesdbloom
Copy link
Collaborator

I have now fixed the PR pipeline (or at least worked around a bug in buildkite) can you please rebase the branch so the build can pass then I can merge your PR.

@Arkinator
Copy link
Contributor Author

Wohoo! James is back! Will get on it :)

@jamesdbloom jamesdbloom merged commit 3c610ff into mock-server:master Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants