-
Notifications
You must be signed in to change notification settings - Fork 182
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GreenMail Core does not build using Oracle JDK 6 #3
Comments
So it looks like we can get around this by adding this import to com.icegreen.greenmail.util.DummySSLSocketFactory import com.sun.net.ssl.internal.ssl.SSLSocketImpl; The primary issue here is that we'd be using what appears to be an internal/deprecated library. No idea if this is going to continue being supported in Java 8 and beyond. |
We can avoid the import by using reflection: try to find out if "setHost" is available and if this is the case set it. This is of course not a very nice fix but I would very much like to keep the setHost in there. In my (Windows) environment the reverse lookup is unbearably slow and I don't see any other way of circumventing this problem. |
Hi Christian - thanks for welcoming me to the project. I believe we should avoid limiting the build scope of Greenmail to Java 1.7 and above. Java 1.6 is still being supported by Oracle and a lot of users (myself included) are using Greenmail in Java 1.6 environments. Reflection is definitely a possibility but what if we were to extend the default Java SecurityManager class and override the methods that cause reverse DNS lookups for SSL chains to do nothing. Then we can do something like: System.setSecurityManager(new ExtendedSecurityManager()); This has the downside of introducing potential security issues when dealing with SSL. |
Reverse DNS lookup latency appears to manifest itself only on Windows OS. For more details see the following Java bug reports. |
Yeah, I guessed that this is a windows issue but sadly many develper computers run windows (including mine...). I think supporting jdk6 is generally a good thing so i would tend to use the reflection "solution". The DummySSLSocketFactory is only used for testing anyways. |
If you have a suggestion on how to fix this issue in a better way pleaselet me know |
Due to a missing class (sun.security.ssl.SSLSocketImpl) I am unable to build GreenMail Core using Oracle JDK 6.
This class only exists in OpenJDK installations. I understand why the SSLSocketImpl class is being used (e.g. to avoid slow reverse DNS lookups) but this change prevents Oracle JDK/JRE users from using/building this library.
The text was updated successfully, but these errors were encountered: