The fix for
NEXUS-6838 introduced a hard dependency on sun.security.ssl.SSLSocketImpl. JREs with alternative JSSE implementations like the IBM JRE do not ship this class.
This dependency leads to a NoClassDefFoundError on attempts to configure a proxy repository with a HTTPS URL, and thus renders the proxy repository feature unusable for https URLs on non-Oracle JVMs.
- Browsing remote for proxy repositories with https remote does not work
- Logfile shows
Steps to reproduce:
- download and install IBM JRE
- start nexus 2.x with IBM JRE
- configure a proxy repository with a https remote
- navigate to "browse remote" and try to browse the content
Use the plattform independent way to set the host for SNI as documented by Oracle: https://docs.oracle.com/javase/8/docs/technotes/guides/security/jsse/JSSERefGuide.html#SNIExamples
Remove dependency on Oracle JRE by using reflection to access SSLSocketImpl.
The quick fix makes https usable for non-Oracle JREs, but removes SNI support for these JREs.
The quick was implemented in this issue - SNI still does not work for any JVM other than Oracle JVMs. See