jersey icon indicating copy to clipboard operation
jersey copied to clipboard

A proposal to fix #4332 (HttpUrlConnector relies on DefaultSSLSocketFactory value which is not a constant)

Open Andremoniy opened this issue 6 years ago • 3 comments

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]

Andremoniy avatar Dec 03 '19 16:12 Andremoniy

What is preventing this fix from moving forward?

dcitron avatar Apr 11 '23 07:04 dcitron

What is preventing this fix from moving forward?

The PR still has one comment that requires a fix, related to: contextField.setAccessible(true);

jbescos avatar Apr 14 '23 06:04 jbescos

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.

dcitron avatar Apr 14 '23 14:04 dcitron