diff options
| author | Martin Willi <martin@revosec.ch> | 2013-11-21 14:22:01 +0100 |
|---|---|---|
| committer | Martin Willi <martin@revosec.ch> | 2014-01-23 15:55:32 +0100 |
| commit | b9ee059ca99bc8fb2a8854b35fef5a7672a03e1b (patch) | |
| tree | bbcb6728cb64f634238f45ed6cdc12460024676f /src/libcharon/plugins/stroke | |
| parent | 37374a292aea466063bf7777929122299d493326 (diff) | |
| download | strongswan-b9ee059ca99bc8fb2a8854b35fef5a7672a03e1b.tar.bz2 strongswan-b9ee059ca99bc8fb2a8854b35fef5a7672a03e1b.tar.xz | |
chunk: Externalize error reporting in chunk_write()
This avoids passing that arbitrary label just for error messages, and gives
greater flexibility in handling errors.
Diffstat (limited to 'src/libcharon/plugins/stroke')
| -rw-r--r-- | src/libcharon/plugins/stroke/stroke_cred.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/libcharon/plugins/stroke/stroke_cred.c b/src/libcharon/plugins/stroke/stroke_cred.c index 8d0001271..224dd9803 100644 --- a/src/libcharon/plugins/stroke/stroke_cred.c +++ b/src/libcharon/plugins/stroke/stroke_cred.c @@ -521,7 +521,16 @@ METHOD(stroke_cred_t, cache_cert, void, if (cert->get_encoding(cert, CERT_ASN1_DER, &chunk)) { - chunk_write(chunk, buf, "crl", 022, TRUE); + if (chunk_write(chunk, buf, 022, TRUE)) + { + DBG1(DBG_CFG, " written crl file '%s' (%d bytes)", + buf, chunk.len); + } + else + { + DBG1(DBG_CFG, " writing crl file '%s' failed: %s", + buf, strerror(errno)); + } free(chunk.ptr); } } |
