Only support using Conscrypt on Java8+

Motivation:

1419f5b601 added support for conscrypt but the CI started to fail when running tests with java7 as conscrypt is compiled with java8.

Modifications:

Only support conscrypt on Java8+

Result:

CI not fails anymore.
This commit is contained in:
Norman Maurer 2017-04-01 20:38:33 +02:00
parent 21562d8808
commit c4832cd9d9

View File

@ -29,6 +29,8 @@ import java.util.List;
import javax.net.ssl.SSLEngine;
import javax.net.ssl.SSLEngineResult;
import javax.net.ssl.SSLException;
import io.netty.util.internal.PlatformDependent;
import org.conscrypt.Conscrypt;
import org.conscrypt.HandshakeListener;
@ -42,7 +44,7 @@ abstract class ConscryptAlpnSslEngine extends JdkSslEngine {
* Indicates whether or not conscrypt is available on the current system.
*/
static boolean isAvailable() {
return ENGINES_CLASS != null;
return ENGINES_CLASS != null && PlatformDependent.javaVersion() >= 8;
}
static boolean isEngineSupported(SSLEngine engine) {