summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2015-07-13 20:04:41 +0200
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2015-07-13 20:04:41 +0200
commit946de179028c97052443ce520f9ae09d715edc7b (patch)
treeb07e6dbbadd20f71fbbefc4707ae42be33e840f8
parent902de48cb362ed428fd8213a92522faa6070f00c (diff)
downloadgnutls-946de179028c97052443ce520f9ae09d715edc7b.tar.gz
Deinitialize the TPM subsystem only when trousers support is enabled
-rw-r--r--lib/gnutls_global.c2
-rw-r--r--lib/tpm.c1
2 files changed, 3 insertions, 0 deletions
diff --git a/lib/gnutls_global.c b/lib/gnutls_global.c
index 19376757fd..0fc50db196 100644
--- a/lib/gnutls_global.c
+++ b/lib/gnutls_global.c
@@ -402,7 +402,9 @@ static void _gnutls_global_deinit(unsigned destructor)
gnutls_pkcs11_deinit();
}
#endif
+#ifdef HAVE_TROUSERS
_gnutls_tpm_global_deinit();
+#endif
gnutls_mutex_deinit(&_gnutls_file_mutex);
gnutls_mutex_deinit(&_gnutls_pkcs11_mutex);
diff --git a/lib/tpm.c b/lib/tpm.c
index effad4ea54..f5613c52d5 100644
--- a/lib/tpm.c
+++ b/lib/tpm.c
@@ -3,6 +3,7 @@
*
* Copyright © 2012 Free Software Foundation.
* Copyright © 2008-2012 Intel Corporation.
+ * Copyright © 2015 Red Hat, Inc.
*
* Author: David Woodhouse <dwmw2@infradead.org>
* Author: Nikos Mavrogiannopoulos