Commit 3b4fb532 authored by Dr. Stephen Henson's avatar Dr. Stephen Henson
Browse files

fclose streams in fips_drbvs.c

Produced error message for unsupported curves in fips_ecdhvs.c
parent 7437036c
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -413,6 +413,11 @@ int main(int argc, char **argv)
			if (group)
				EC_GROUP_free(group);
			group = EC_GROUP_new_by_curve_name(nid);
			if (!group)
				{
				fprintf(stderr, "ERROR: unsupported curve %s\n", buf + 1);
				return 1;
				}
			}

		if (strlen(buf) > 6 && !strncmp(buf, "[E", 2))
+5 −1
Original line number Diff line number Diff line
@@ -176,7 +176,7 @@ int fips_drbgvs_main(int argc,char **argv)
int main(int argc,char **argv)
#endif
	{
	FILE *in, *out;
	FILE *in = NULL, *out = NULL;
	DRBG_CTX *dctx = NULL;
	TEST_ENT t;
	int r, nid = 0;
@@ -406,6 +406,10 @@ int main(int argc,char **argv)
			}

		}
	if (in && in != stdin)
		fclose(in);
	if (out && out != stdout)
		fclose(out);
	return 0;
	}