NetHttpTransport.Builder trustCertificates() clobbers any changes made through setSslSocketFactory() #1663
Labels
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: docs
Improvement to the documentation for an API.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Environment details
Steps to reproduce
The issue came up for Dataproc Hadoop Connector (GoogleCloudDataproc/hadoop-connectors#782) which uses a custom SslSocketFactory to enable socket level options, e.g. keep-alive. When the builder was used this way it would lose context on trustCertificates or vice-versa depending on which method was called first.
Addressing the builder implementation to be more of an intent rather than calling setSslSocketFactory() in trustCertificates would help make the builder easier to use. In addition documentation for these builder methods is non-descriptive beyond what the value means and it would help to call out quirks in implementation.
Code example
External references such as API reference guides
The text was updated successfully, but these errors were encountered: