Re: [PATCH v6 5/7] tpm: retrieve digest size of unknown algorithms with PCR read

2018-12-12 Thread Jarkko Sakkinen
On Thu, Dec 06, 2018 at 07:00:13PM +0100, Roberto Sassu wrote: > On 12/5/2018 12:53 AM, Jarkko Sakkinen wrote: > > On Tue, Dec 04, 2018 at 09:21:36AM +0100, Roberto Sassu wrote: > > > + for (i = 0; i < ARRAY_SIZE(tpm2_hash_map); i++) { > > > + enum hash_algo crypto_algo = tpm2_hash_map[i].c

Re: [PATCH v6 5/7] tpm: retrieve digest size of unknown algorithms with PCR read

2018-12-06 Thread Roberto Sassu
On 12/5/2018 12:53 AM, Jarkko Sakkinen wrote: On Tue, Dec 04, 2018 at 09:21:36AM +0100, Roberto Sassu wrote: + for (i = 0; i < ARRAY_SIZE(tpm2_hash_map); i++) { + enum hash_algo crypto_algo = tpm2_hash_map[i].crypto_id; + + if (bank->alg_id != tpm2_hash_map[i].t

Re: [PATCH v6 5/7] tpm: retrieve digest size of unknown algorithms with PCR read

2018-12-04 Thread Jarkko Sakkinen
On Tue, Dec 04, 2018 at 09:21:36AM +0100, Roberto Sassu wrote: > + for (i = 0; i < ARRAY_SIZE(tpm2_hash_map); i++) { > + enum hash_algo crypto_algo = tpm2_hash_map[i].crypto_id; > + > + if (bank->alg_id != tpm2_hash_map[i].tpm_id) > + continue; > + >