changed logging of crl writing to old style

This commit is contained in:
Andreas Steffen
2008-04-17 20:23:31 +00:00
parent 5434d5f7e9
commit 8eeb796a51
+4 -4
View File
@@ -534,7 +534,7 @@ static void cache_cert(private_stroke_cred_t *this, certificate_t *cert)
{ {
if (cert->get_type(cert) == CERT_X509_CRL && this->cachecrl) if (cert->get_type(cert) == CERT_X509_CRL && this->cachecrl)
{ {
/* CRLs get cached to /etc/ipsec.d/crls/authkeyId.der */ /* CRLs get written to /etc/ipsec.d/crls/authkeyId.crl */
crl_t *crl = (crl_t*)cert; crl_t *crl = (crl_t*)cert;
cert->get_ref(cert); cert->get_ref(cert);
@@ -548,17 +548,17 @@ static void cache_cert(private_stroke_cred_t *this, certificate_t *cert)
id = crl->get_authKeyIdentifier(crl); id = crl->get_authKeyIdentifier(crl);
chunk = id->get_encoding(id); chunk = id->get_encoding(id);
hex = chunk_to_hex(chunk, FALSE); hex = chunk_to_hex(chunk, FALSE);
snprintf(buf, sizeof(buf), "%s/%s.der", CRL_DIR, hex); snprintf(buf, sizeof(buf), "%s/%s.crl", CRL_DIR, hex);
free(hex); free(hex);
chunk = cert->get_encoding(cert); chunk = cert->get_encoding(cert);
if (chunk_write(chunk, buf, 022, TRUE)) if (chunk_write(chunk, buf, 022, TRUE))
{ {
DBG1(DBG_CFG, "cached crl to %s", buf); DBG1(DBG_CFG, " written crl to '%s'", buf);
} }
else else
{ {
DBG1(DBG_CFG, "caching crl to %s failed", buf); DBG1(DBG_CFG, " writing crl to '%s' failed", buf);
} }
free(chunk.ptr); free(chunk.ptr);
} }