A proposal to fix #4332 (HttpUrlConnector relies on DefaultSSLSocketFactory value which is not a constant)
A proposal to fix https://github.com/eclipse-ee4j/jersey/issues/4332
Despite the fact that HttpsURLConnection.getDefaultSSLSocketFactory() result is not always unique, all default SSLSocketFactory share the same SSLContextImpl:
public final class SSLSocketFactoryImpl extends SSLSocketFactory {
private final SSLContextImpl context;
public SSLSocketFactoryImpl() throws Exception {
this.context = DefaultSSLContext.getDefaultImpl();
}
This is a proposed solution to use this additional check.
Signed-off-by: Andrey Lebedev [email protected]
What is preventing this fix from moving forward?
What is preventing this fix from moving forward?
The PR still has one comment that requires a fix, related to: contextField.setAccessible(true);
What is preventing this fix from moving forward?
The PR still has one comment that requires a fix, related to:
contextField.setAccessible(true);
Yeah, on further reflection (haha) it would be better if we can come up with a fix that doesn't require reflection. I'll think about it too.