migrated write_chunk() to chunk_write()

This commit is contained in:
Andreas Steffen
2009-04-20 06:58:00 +00:00
parent 4f4ae2f465
commit 3eb5042e9c
8 changed files with 25 additions and 81 deletions
+3 -10
View File
@@ -568,13 +568,13 @@ static void cache_cert(private_stroke_cred_t *this, certificate_t *cert)
{
if (cert->get_type(cert) == CERT_X509_CRL && this->cachecrl)
{
/* CRLs get written to /etc/ipsec.d/crls/authkeyId.crl */
/* CRLs get written to /etc/ipsec.d/crls/<authkeyId>.crl */
crl_t *crl = (crl_t*)cert;
cert->get_ref(cert);
if (add_crl(this, crl))
{
char buf[256];
char buf[BUF_LEN];
chunk_t chunk, hex;
identification_t *id;
@@ -585,14 +585,7 @@ static void cache_cert(private_stroke_cred_t *this, certificate_t *cert)
free(hex.ptr);
chunk = cert->get_encoding(cert);
if (chunk_write(chunk, buf, 022, TRUE))
{
DBG1(DBG_CFG, " written crl to '%s'", buf);
}
else
{
DBG1(DBG_CFG, " writing crl to '%s' failed", buf);
}
chunk_write(chunk, buf, "crl", 022, TRUE);
free(chunk.ptr);
}
}