< prev index next >

src/jdk.crypto.ec/share/native/libsunec/impl/ecl_mult.c

Print this page
rev 16201 : 8170525: Fix minor issues in AWT/ECC/PKCS11 coding
Reviewed-by: vinnie, clanger, prr, ssadetsky

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2007, 2016, 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
  * modify it under the terms of the GNU Lesser General Public
  * License as published by the Free Software Foundation; either

@@ -31,10 +31,11 @@
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
  *   Douglas Stebila <douglas@stebila.ca>, Sun Microsystems Laboratories
  *
+ * Last Modified Date from the Original Code: Nov 2016
  *********************************************************************** */
 
 #include "mpi.h"
 #include "mplogic.h"
 #include "ecl.h"

@@ -70,20 +71,22 @@
 
         if ((px == NULL) || (py == NULL)) {
                 if (group->base_point_mul) {
                         MP_CHECKOK(group->base_point_mul(&kt, rx, ry, group));
                 } else {
+                        kt.flag = (mp_sign)0;
                         MP_CHECKOK(group->
                                            point_mul(&kt, &group->genx, &group->geny, rx, ry,
                                                                  group));
                 }
         } else {
                 if (group->meth->field_enc) {
                         MP_CHECKOK(group->meth->field_enc(px, rx, group->meth));
                         MP_CHECKOK(group->meth->field_enc(py, ry, group->meth));
                         MP_CHECKOK(group->point_mul(&kt, rx, ry, rx, ry, group));
                 } else {
+                        kt.flag = (mp_sign)0;
                         MP_CHECKOK(group->point_mul(&kt, px, py, rx, ry, group));
                 }
         }
         if (group->meth->field_dec) {
                 MP_CHECKOK(group->meth->field_dec(rx, rx, group->meth));
< prev index next >