** certtool: --outder option now works for private
and public keys as well.
-** libgnutls: Corrected memory leak in DH parameter
-generation.
+** libgnutls: Corrected memory leaks in DH parameter
+generation and ecc_projective_check_point().
** libgnutls: Added gnutls_x509_dn_oid_name() to
return a descriptive name of a DN OID.
if (P == NULL || b == NULL || modulus == NULL)
return -1;
- if ((err = mp_init_multi (&t1, &t2, &t3, NULL)) != 0)
- {
- return err;
- }
-
if (mpz_cmp_ui (P->z, 1) != 0)
{
gnutls_assert ();
return -1;
}
+ if ((err = mp_init_multi (&t1, &t2, &t3, NULL)) != 0)
+ {
+ return err;
+ }
+
/* t1 = Z * Z */
mpz_mul (t1, P->y, P->y);
mpz_mod (t1, t1, modulus); /* t1 = y^2 */
if (mpz_cmp_ui (t1, 0) != 0)
{
- return -1;
+ err = -1;
}
else
{
- return 0;
+ err = 0;
}
+
+ mp_clear_multi(&t1, &t2, &t3, NULL);
+
+ return err;
}
#endif