summaryrefslogtreecommitdiff
path: root/src/openac/openac.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/openac/openac.c')
-rw-r--r--src/openac/openac.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/openac/openac.c b/src/openac/openac.c
index 7074d44be..8862e9ab0 100644
--- a/src/openac/openac.c
+++ b/src/openac/openac.c
@@ -29,6 +29,7 @@
#include <getopt.h>
#include <ctype.h>
#include <time.h>
+#include <errno.h>
#include <library.h>
#include <utils/debug.h>
@@ -228,7 +229,7 @@ int main(int argc, char **argv)
/* initialize library */
atexit(library_deinit);
- if (!library_init(NULL))
+ if (!library_init(NULL, "openac"))
{
exit(SS_RC_LIBSTRONGSWAN_INTEGRITY);
}
@@ -515,11 +516,18 @@ int main(int argc, char **argv)
/* write the attribute certificate to file */
if (attr_cert->get_encoding(attr_cert, CERT_ASN1_DER, &attr_chunk))
{
- if (chunk_write(attr_chunk, outfile, "attribute cert", 0022, TRUE))
+ if (chunk_write(attr_chunk, outfile, 0022, TRUE))
{
+ DBG1(DBG_APP, " written attribute cert file '%s' (%d bytes)",
+ outfile, attr_chunk.len);
write_serial(serial);
status = 0;
}
+ else
+ {
+ DBG1(DBG_APP, " writing attribute cert file '%s' failed: %s",
+ outfile, strerror(errno));
+ }
}
}
else