diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2016-12-04 09:56:13 +0100 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@redhat.com> | 2016-12-05 08:26:57 +0100 |
commit | 49146f057d91fb5cad8bcdcf91a21fe9686f2305 (patch) | |
tree | 8dc854ee5f05f25e3cc0bbd83362e8971c1603a5 /lib/tpm.c | |
parent | 50e8ed9e742198c0952464b1a7d44a5e8b84aee3 (diff) | |
download | gnutls-49146f057d91fb5cad8bcdcf91a21fe9686f2305.tar.gz |
In import_tpm_key_cb() fix the wrong password loop
When calling import_tpm_key() once it initializes the key, but
a second call fails due to the key being already initialized. Ensure
that failure of import_tpm_key() leaves the key on a clear state.
Reported by James Bottomley <James.Bottomley@HansenPartnership.com>.
Diffstat (limited to 'lib/tpm.c')
-rw-r--r-- | lib/tpm.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -688,6 +688,7 @@ import_tpm_key(gnutls_privkey_t pkey, pTspi_Context_CloseObject(s->tpm_ctx, s->tpm_key); s->tpm_key = 0; out_session: + _gnutls_privkey_cleanup(pkey); tpm_close_session(s); out_ctx: gnutls_free(s); |