diff options
author | James Bottomley <James.Bottomley@HansenPartnership.com> | 2020-01-10 07:49:37 -0800 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2020-01-10 08:05:19 -0800 |
commit | dd04b7bc7eff5e803a095781e11c104e6dfcd765 (patch) | |
tree | 174c15165add340aacece80854d8672d84441069 | |
parent | 366b9280b5652fbbfe89577f1a5c9dbf396c2e4a (diff) | |
download | openssl_tpm2_engine-dd04b7bc7eff5e803a095781e11c104e6dfcd765.tar.gz |
tpm2-common: make empty auth optional
The ASN.1 spec lists it as optional and if it's not present it should
be treated as boolean false (meaning the key needs authorization).
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
-rw-r--r-- | tpm2-common.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tpm2-common.c b/tpm2-common.c index 891a603..763fccf 100644 --- a/tpm2-common.c +++ b/tpm2-common.c @@ -1107,6 +1107,10 @@ int tpm2_load_engine_file(const char *filename, struct app_data **app_data, goto err; } + if (empty_auth == -1) + /* not present means auth is not empty */ + empty_auth = 0; + ad = OPENSSL_malloc(sizeof(*ad)); if (!ad) { |