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 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 toInitializationData
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 existingclassLoader
and wrap it with a decorator that re-implementsgetResourceAsStream
.