/* 	$OpenBSD: tests.c,v 1.4 2025/04/15 04:00:42 djm Exp $ */
/*
 * Placed in the public domain
 */

#include "../test_helper/test_helper.h"

#include <stdio.h>

#ifdef ENABLE_KEX_DH
#include <stdlib.h> /* for getenv(3) */
extern void dh_set_moduli_file(const char *);
#endif

void kex_tests(void);
void kex_proposal_tests(void);
void kex_proposal_populate_tests(void);

void
tests(void)
{
#ifdef ENABLE_KEX_DH
{	char *name = getenv("TEST_SSH_MODULI_FILE");
	if (name != NULL)
		dh_set_moduli_file(name);
}
#endif
	kex_tests();
	kex_proposal_tests();
	kex_proposal_populate_tests();
}

void
benchmarks(void)
{
#ifdef ENABLE_KEX_DH
{	char *name = getenv("TEST_SSH_MODULI_FILE");
	if (name != NULL)
		dh_set_moduli_file(name);
}
#endif
	kex_tests();
}
