summaryrefslogtreecommitdiffstats
path: root/src/usr/imgtrust.c
diff options
context:
space:
mode:
authorMichael Brown2012-03-27 00:24:27 +0200
committerMichael Brown2012-03-27 00:24:27 +0200
commit2d11a46b716f1d7e3391c82ea7feea39983f81cb (patch)
tree0a46f2db732f3b935a51fa440ce44b2209145fde /src/usr/imgtrust.c
parent[downloader] Log final status of all downloads (diff)
downloadipxe-2d11a46b716f1d7e3391c82ea7feea39983f81cb.tar.gz
ipxe-2d11a46b716f1d7e3391c82ea7feea39983f81cb.tar.xz
ipxe-2d11a46b716f1d7e3391c82ea7feea39983f81cb.zip
[image] Log results of image signature checks
Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/usr/imgtrust.c')
-rw-r--r--src/usr/imgtrust.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/usr/imgtrust.c b/src/usr/imgtrust.c
index 5ea20265..59660782 100644
--- a/src/usr/imgtrust.c
+++ b/src/usr/imgtrust.c
@@ -21,6 +21,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
#include <stdlib.h>
#include <errno.h>
#include <time.h>
+#include <syslog.h>
#include <ipxe/uaccess.h>
#include <ipxe/image.h>
#include <ipxe/cms.h>
@@ -72,10 +73,18 @@ int imgverify ( struct image *image, struct image *signature,
/* Mark image as trusted */
image_trust ( image );
+ syslog ( LOG_NOTICE, "Image \"%s\" signature OK\n", image->name );
+
+ /* Free internal copy of signature */
+ free ( data );
+
+ return 0;
err_verify:
err_parse:
free ( data );
err_alloc:
+ syslog ( LOG_ERR, "Image \"%s\" signature bad: %s\n",
+ image->name, strerror ( rc ) );
return rc;
}