changeset 11042:7f7c962d84c4

8075833: Straighter Elliptic Curves Reviewed-by: mullan
author igerasim
date Wed, 22 Apr 2015 23:29:47 +0300
parents 0eada473e09f
children 84a3ab8d0be3
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	Wed Apr 22 00:24:58 2015 +0300
+++ 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;