From 83a0b74da82547835b95314e356a2b1ba3f7447e Mon Sep 17 00:00:00 2001 From: Martin Willi Date: Wed, 31 Jul 2013 11:36:55 +0200 Subject: [PATCH] keychain: be less verbose when loading certificates --- src/libstrongswan/plugins/keychain/keychain_creds.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libstrongswan/plugins/keychain/keychain_creds.c b/src/libstrongswan/plugins/keychain/keychain_creds.c index ddcc7a461b..d60f28691d 100644 --- a/src/libstrongswan/plugins/keychain/keychain_creds.c +++ b/src/libstrongswan/plugins/keychain/keychain_creds.c @@ -69,10 +69,11 @@ static mem_cred_t* load_certs(private_keychain_creds_t *this, char *path) SecKeychainItemRef item; mem_cred_t *set; OSStatus status; + int loaded = 0; set = mem_cred_create(); - DBG1(DBG_CFG, "loading certificates from %s:", path); + DBG2(DBG_CFG, "loading certificates from %s:", path); status = SecKeychainOpen(path, &keychain); if (status == errSecSuccess) { @@ -95,8 +96,9 @@ static mem_cred_t* load_certs(private_keychain_creds_t *this, char *path) BUILD_END); if (cert) { - DBG1(DBG_CFG, " loaded '%Y'", cert->get_subject(cert)); + DBG2(DBG_CFG, " loaded '%Y'", cert->get_subject(cert)); set->add_cert(set, TRUE, cert); + loaded++; } SecKeychainItemFreeAttributesAndData(NULL, data); } @@ -106,6 +108,7 @@ static mem_cred_t* load_certs(private_keychain_creds_t *this, char *path) } CFRelease(keychain); } + DBG1(DBG_CFG, "loaded %d certificates from %s", loaded, path); return set; } -- 2.47.2