From: Martin Willi Date: Wed, 31 Jul 2013 09:36:55 +0000 (+0200) Subject: keychain: be less verbose when loading certificates X-Git-Tag: 5.1.0~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83a0b74da82547835b95314e356a2b1ba3f7447e;p=thirdparty%2Fstrongswan.git keychain: be less verbose when loading certificates --- 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; }