From 5bce4adfbb1c24db1ebb8d6012e13dd2e646b8e2 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Thu, 3 Mar 2011 19:15:49 -0600 Subject: [PATCH] ifcfg-rh: clean up temporary testcase certificates files (fixes distcheck) --- .../plugins/ifcfg-rh/tests/test-ifcfg-rh.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c index 1f042f1ef0..7113f82c29 100644 --- a/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c +++ b/src/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c @@ -49,6 +49,7 @@ #include "common.h" #include "reader.h" #include "writer.h" +#include "utils.h" #if 0 static void @@ -7021,6 +7022,7 @@ test_write_wired_8021x_tls (NMSetting8021xCKScheme scheme, gboolean ignore_error = FALSE; NMSetting8021xCKFormat format = NM_SETTING_802_1X_CK_FORMAT_UNKNOWN; const char *pw; + char *tmp; connection = nm_connection_new (); g_assert (connection != NULL); @@ -7184,6 +7186,19 @@ test_write_wired_8021x_tls (NMSetting8021xCKScheme scheme, g_assert (nm_connection_compare (connection, reread, NM_SETTING_COMPARE_FLAG_EXACT)); } + /* Clean up created certs and keys */ + tmp = utils_cert_path (testfile, "ca-cert.der"); + unlink (tmp); + g_free (tmp); + + tmp = utils_cert_path (testfile, "client-cert.der"); + unlink (tmp); + g_free (tmp); + + tmp = utils_cert_path (testfile, "private-key.pem"); + unlink (tmp); + g_free (tmp); + g_free (testfile); g_object_unref (connection); g_object_unref (reread);