Re: [LTP] [PATCH 2/6] crypto/af_alg01: new regression test for hmac nesting bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Eric,

> +static void run(void)
> +{
> +	/* try several different unkeyed hash algorithms */
> +	static const char * const hash_algs[] = {
> +		"md5", "md5-generic",
> +		"sha1", "sha1-generic",
> +		"sha224", "sha224-generic",
> +		"sha256", "sha256-generic",
> +		"sha3-256", "sha3-256-generic",
> +		"sha3-512", "sha3-512-generic",
> +	};
> +	size_t i;
FYI: We usually use struct tcase with .tcnt = ARRAY_SIZE(tcases)
instead of for loop, but it's only a minor detail.

> +
> +	for (i = 0; i < ARRAY_SIZE(hash_algs); i++)
> +		test_with_hash_alg(hash_algs[i]);
> +}
> +
> +static struct tst_test test = {
> +	.test_all = run,
> +};


Kind regards,
Petr



[Index of Archives]     [Kernel]     [Gnu Classpath]     [Gnu Crypto]     [DM Crypt]     [Netfilter]     [Bugtraq]

  Powered by Linux