shortened file loading debug output

This commit is contained in:
Andreas Steffen
2009-09-22 12:33:13 +02:00
parent 1271983ab9
commit 4b15ee8cd9
3 changed files with 26 additions and 27 deletions
+22 -23
View File
@@ -432,12 +432,11 @@ static certificate_t* load_peer(private_stroke_cred_t *this, char *filename)
if (cert) if (cert)
{ {
cert = add_cert(this, cert); cert = add_cert(this, cert);
DBG1(DBG_CFG, " loaded certificate '%Y' from " DBG1(DBG_CFG, " loaded certificate '%Y' from '%s'",
"file '%s'", cert->get_subject(cert), filename); cert->get_subject(cert), filename);
return cert->get_ref(cert); return cert->get_ref(cert);
} }
DBG1(DBG_CFG, " loading certificate from file " DBG1(DBG_CFG, " loading certificate from '%s' failed", filename);
"'%s' failed", filename);
return NULL; return NULL;
} }
@@ -471,8 +470,8 @@ static void load_certdir(private_stroke_cred_t *this, char *path,
{ {
case CERT_X509: case CERT_X509:
if (flag & X509_CA) if (flag & X509_CA)
{ /* for CA certificates, we strictly require CA { /* for CA certificates, we strictly require
* basicconstraints to be set */ * the CA basic constraint to be set */
cert = lib->creds->create(lib->creds, cert = lib->creds->create(lib->creds,
CRED_CERTIFICATE, CERT_X509, CRED_CERTIFICATE, CERT_X509,
BUILD_FROM_FILE, file, BUILD_END); BUILD_FROM_FILE, file, BUILD_END);
@@ -482,22 +481,22 @@ static void load_certdir(private_stroke_cred_t *this, char *path,
if (!(x509->get_flags(x509) & X509_CA)) if (!(x509->get_flags(x509) & X509_CA))
{ {
DBG1(DBG_CFG, " ca certificate '%Y' misses " DBG1(DBG_CFG, " CA certificate '%Y' misses "
"ca basic constraint, discarded", "CA basic constraint, discarded",
cert->get_subject(cert)); cert->get_subject(cert));
cert->destroy(cert); cert->destroy(cert);
cert = NULL; cert = NULL;
} }
else else
{ {
DBG1(DBG_CFG, " loaded CA certificate '%Y' from " DBG1(DBG_CFG, " loaded CA certificate '%Y' from '%s'",
"file '%s'", cert->get_subject(cert), file); cert->get_subject(cert), file);
} }
} }
else else
{ {
DBG1(DBG_CFG, " loading CA certificate from file " DBG1(DBG_CFG, " loading CA certificate from '%s' "
"'%s' failed", file); "failed", file);
} }
} }
else else
@@ -508,13 +507,13 @@ static void load_certdir(private_stroke_cred_t *this, char *path,
BUILD_X509_FLAG, flag, BUILD_END); BUILD_X509_FLAG, flag, BUILD_END);
if (cert) if (cert)
{ {
DBG1(DBG_CFG, " loaded certificate '%Y' from " DBG1(DBG_CFG, " loaded certificate '%Y' from '%s'",
"file '%s'", cert->get_subject(cert), file); cert->get_subject(cert), file);
} }
else else
{ {
DBG1(DBG_CFG, " loading certificate from file " DBG1(DBG_CFG, " loading certificate from '%s' "
"'%s' failed", file); "failed", file);
} }
} }
if (cert) if (cert)
@@ -530,11 +529,11 @@ static void load_certdir(private_stroke_cred_t *this, char *path,
if (cert) if (cert)
{ {
add_crl(this, (crl_t*)cert); add_crl(this, (crl_t*)cert);
DBG1(DBG_CFG, " loaded crl from file '%s'", file); DBG1(DBG_CFG, " loaded crl from '%s'", file);
} }
else else
{ {
DBG1(DBG_CFG, " loading crl from file '%s' failed", file); DBG1(DBG_CFG, " loading crl from '%s' failed", file);
} }
break; break;
case CERT_X509_AC: case CERT_X509_AC:
@@ -545,13 +544,13 @@ static void load_certdir(private_stroke_cred_t *this, char *path,
if (cert) if (cert)
{ {
add_ac(this, (ac_t*)cert); add_ac(this, (ac_t*)cert);
DBG1(DBG_CFG, " loaded attribute certificate from " DBG1(DBG_CFG, " loaded attribute certificate from '%s'",
"file '%s'", file); file);
} }
else else
{ {
DBG1(DBG_CFG, " loading attribute certificate from " DBG1(DBG_CFG, " loading attribute certificate from '%s' "
"file '%s' failed", file); "failed", file);
} }
break; break;
default: default:
@@ -915,7 +914,7 @@ static void load_secrets(private_stroke_cred_t *this, char *file, int level,
} }
else else
{ {
DBG1(DBG_CFG, " skipped private key file '%s'", path); DBG1(DBG_CFG, " loading private key file '%s' failed", path);
} }
chunk_clear(&secret); chunk_clear(&secret);
} }
@@ -1,8 +1,8 @@
moon::cat /var/log/daemon.log::loaded crl from file::YES moon::cat /var/log/daemon.log::loaded crl from::YES
moon::cat /var/log/daemon.log::crl is valid::YES moon::cat /var/log/daemon.log::crl is valid::YES
moon::cat /var/log/daemon.log::certificate status is good::YES moon::cat /var/log/daemon.log::certificate status is good::YES
moon::ipsec listcrls:: ok::YES moon::ipsec listcrls:: ok::YES
carol::cat /var/log/daemon.log::loaded crl from file::YES carol::cat /var/log/daemon.log::loaded crl from::YES
carol::cat /var/log/daemon.log::crl is valid::YES carol::cat /var/log/daemon.log::crl is valid::YES
carol::cat /var/log/daemon.log::certificate status is good::YES carol::cat /var/log/daemon.log::certificate status is good::YES
carol::ipsec listcrls:: ok::YES carol::ipsec listcrls:: ok::YES
+2 -2
View File
@@ -1,9 +1,9 @@
moon::cat /var/log/daemon.log::loaded crl file::YES moon::cat /var/log/daemon.log::loaded crl from::YES
moon::cat /var/log/daemon.log::crl is stale::YES moon::cat /var/log/daemon.log::crl is stale::YES
moon::cat /var/log/daemon.log::fetching crl from.*ldap::YES moon::cat /var/log/daemon.log::fetching crl from.*ldap::YES
moon::cat /var/log/daemon.log::crl is valid::YES moon::cat /var/log/daemon.log::crl is valid::YES
moon::cat /var/log/daemon.log::certificate status is good::YES moon::cat /var/log/daemon.log::certificate status is good::YES
carol::cat /var/log/daemon.log::loaded crl file::YES carol::cat /var/log/daemon.log::loaded crl from::YES
carol::cat /var/log/daemon.log::crl is stale::YES carol::cat /var/log/daemon.log::crl is stale::YES
carol::cat /var/log/daemon.log::fetching crl from.*ldap::YES carol::cat /var/log/daemon.log::fetching crl from.*ldap::YES
carol::cat /var/log/daemon.log::crl is valid::YES carol::cat /var/log/daemon.log::crl is valid::YES