{
int ret;
gnutls_group_st group;
-
+
ret = _gnutls_mpi_generate_group (&group, bits);
if (ret < 0)
{
return result;
}
+ if (_gnutls_mpi_cmp_ui(params->params[0], 0) == 0)
+ {
+ asn1_delete_structure (&c2);
+ return gnutls_assert_val(GNUTLS_E_ILLEGAL_PARAMETER);
+ }
+
/* read the generator
*/
result = _gnutls_x509_read_int (c2, "base", ¶ms->params[1]);
return result;
}
+ if (_gnutls_mpi_cmp_ui(params->params[1], 0) == 0)
+ {
+ asn1_delete_structure (&c2);
+ _gnutls_mpi_release (¶ms->params[0]);
+ return gnutls_assert_val(GNUTLS_E_ILLEGAL_PARAMETER);
+ }
+
asn1_delete_structure (&c2);
return 0;