--- a/jdk/src/jdk.crypto.ec/share/native/libsunec/impl/ec.c Fri Apr 17 15:36:32 2015 +0100
+++ b/jdk/src/jdk.crypto.ec/share/native/libsunec/impl/ec.c Mon Apr 20 16:26:12 2015 +0100
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2015, Oracle and/or its affiliates. All rights reserved.
* Use is subject to license terms.
*
* This library is free software; you can redistribute it and/or
@@ -585,6 +585,10 @@
return SECFailure;
}
+ if (EC_ValidatePublicKey(ecParams, publicValue, kmflag) != SECSuccess) {
+ return SECFailure;
+ }
+
memset(derivedSecret, 0, sizeof *derivedSecret);
len = (ecParams->fieldID.size + 7) >> 3;
pointQ.len = 2*len + 1;