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

Fix android IceSSL testing #3304

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

pepone
Copy link
Member

@pepone pepone commented Dec 23, 2024

This PR fixes Android SSL testing, see #3288

With Ice 3.7, we relied on delaying IceSSL plug-in initialization and then manually setting the key store or trust store from the test controller helper in the communicator-initialized hook.

With Ice 3.8, this approach doesn't work because IceSSL is no longer a plug-in. It’s now a built-in transport, and its configuration must either be specified using IceSSL properties (as before) or when the communicator is created (client side) or the object adapter is created (server side).

Using the new native SSL APIs would require reviewing all object adapter creation in the test suite to correctly set the SSL configuration. For the client side, communicators are already created with a helper method, which simplifies things.

To keep it simpler, I added a new resourceLoader member to InitializationData that allows loading certificates using a custom loader; in this case, we want to load them from Android resources.

If we don’t want to take this approach of adding a new resourceLoader, an alternative would be to set the existing classLoader and wrap it with a decorator that re-implements getResourceAsStream.

Copy link
Member

@externl externl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants