changeset 8308:1ea911b8a36e

8075833: Straighter Elliptic Curves Reviewed-by: mullan
author igerasim
date Wed, 22 Apr 2015 23:29:47 +0300
parents 4f028479c666
children 27d53436ba6b
files src/share/native/sun/security/ec/impl/ec.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/native/sun/security/ec/impl/ec.c	Tue Apr 21 20:58:31 2015 +0100
+++ b/src/share/native/sun/security/ec/impl/ec.c	Wed Apr 22 23:29:47 2015 +0300
@@ -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;