Re: [PATCH] crypto: tcrypt - Add mode to test specified algs

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

 



On Mon, Jan 23, 2017 at 04:13:04PM +0100, Rabin Vincent wrote:
> 
> That's what I thought so too, but that doesn't seem to be the case.  The
> mode=0 handling is this:
> 
> 	switch (m) {
> 	case 0:
> 		if (alg) {
> 			if (!crypto_has_alg(alg, type,
> 					    mask ?: CRYPTO_ALG_TYPE_MASK))
> 				ret = -ENOENT;
> 			break;
> 		}
> 
> 		for (i = 1; i < 200; i++)
> 			ret += do_test(NULL, 0, 0, i);
> 		break;
> 
> So, if alg= is specified, after first checking if the specified alg is
> present, it just goes ahead and runs all the tests.  I'm not sure what
> mode=0 alg=foo is meant to be used for.

You need to set the type and mask for it to work.

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt



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

  Powered by Linux