summaryrefslogtreecommitdiff
path: root/lib/tpm.c
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2014-09-08 10:42:31 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2014-09-08 10:42:37 +0200
commit75a2938927223d3c8b9527885f418f706577b3f2 (patch)
treed03d346105b9ce6af2234ece26756a8664f4945b /lib/tpm.c
parent2ed63de195838fedee9ece728cc3bba47f2cf937 (diff)
downloadgnutls-75a2938927223d3c8b9527885f418f706577b3f2.tar.gz
gnutls_tpm_privkey_generate: initialize input values to null to prevent any issue
Diffstat (limited to 'lib/tpm.c')
-rw-r--r--lib/tpm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/tpm.c b/lib/tpm.c
index e962386b0c..673cef6877 100644
--- a/lib/tpm.c
+++ b/lib/tpm.c
@@ -1220,6 +1220,10 @@ gnutls_tpm_privkey_generate(gnutls_pk_algorithm_t pk, unsigned int bits,
TSS_HTPM htpm;
uint8_t buf[32];
+ privkey->data = NULL;
+ if (pubkey != NULL)
+ pubkey->data = NULL;
+
if (flags & GNUTLS_TPM_KEY_SIGNING)
tpm_flags |= TSS_KEY_TYPE_SIGNING;
else