diff options
author | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-09-08 10:42:31 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2014-09-08 10:42:37 +0200 |
commit | 75a2938927223d3c8b9527885f418f706577b3f2 (patch) | |
tree | d03d346105b9ce6af2234ece26756a8664f4945b /lib/tpm.c | |
parent | 2ed63de195838fedee9ece728cc3bba47f2cf937 (diff) | |
download | gnutls-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.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -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 |