--- a/jdk/src/java.base/share/classes/sun/security/ssl/EllipticCurvesExtension.java Tue Oct 11 09:50:04 2016 +0200
+++ b/jdk/src/java.base/share/classes/sun/security/ssl/EllipticCurvesExtension.java Tue Oct 11 09:11:34 2016 +0000
@@ -282,7 +282,7 @@
private static int getPreferredCurve(int[] curves,
AlgorithmConstraints constraints) {
for (int curveId : curves) {
- if (constraints.permits(
+ if (isSupported(curveId) && constraints.permits(
EnumSet.of(CryptoPrimitive.KEY_AGREEMENT),
"EC", idToParams.get(curveId))) {
return curveId;