Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1260602
| From | Mimi Zohar <zohar@linux.vnet.ibm.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2 1/3] keys, trusted: select the hash algorithm |
| Date | 2015-11-02 13:50 +0100 |
| Message-ID | <qqmIG-5mP-13@gated-at.bofh.it> (permalink) |
| References | <qpgch-5f8-9@gated-at.bofh.it> <qpgci-5f8-37@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Fri, 2015-10-30 at 13:35 +0200, Jarkko Sakkinen wrote:
> @@ -787,6 +791,20 @@ static int getoptions(char *c, struct trusted_key_payload *pay,
> return -EINVAL;
> opt->pcrlock = lock;
> break;
> + case Opt_hash:
> + for (i = 0; i < HASH_ALGO__LAST; i++) {
> + if (!strcmp(args[0].from, hash_algo_name[i])) {
> + opt->hash = i;
> + break;
> + }
> + }
> + res = tpm_is_tpm2(TPM_ANY_NUM);
While looking at this, I wanted to verify that chips are still added to
the tail of the tpm_chip_list. Unfortunately, commit "afb5abc tpm:
two-phase chip management functions" reverted David Howell's commit
"770ab65 TPM: Add new TPMs to the tail of the list to prevent
inadvertent change of dev".
> + if (res < 0)
> + return res;
> + if (i == HASH_ALGO__LAST ||
> + (!res && i != HASH_ALGO_SHA1))
> + return -EINVAL;
> + break;
If the first TPM registered is a TPM 1.2, then changing the default TPM
2.0 hash algorithm will fail.
Mimi
> default:
> return -EINVAL;
> }
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
Re: [PATCH v2 1/3] keys, trusted: select the hash algorithm Mimi Zohar <zohar@linux.vnet.ibm.com> - 2015-11-02 13:50 +0100
Re: [PATCH v2 1/3] keys, trusted: select the hash algorithm Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2015-11-02 18:50 +0100
Re: [PATCH v2 1/3] keys, trusted: select the hash algorithm Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2015-11-03 08:40 +0100
Re: [PATCH v2 1/3] keys, trusted: select the hash algorithm Mimi Zohar <zohar@linux.vnet.ibm.com> - 2015-11-03 16:50 +0100
Re: [PATCH v2 1/3] keys, trusted: select the hash algorithm Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2015-11-03 17:20 +0100
Re: [PATCH v2 1/3] keys, trusted: select the hash algorithm Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2015-11-04 14:20 +0100
csiph-web