aboutsummaryrefslogtreecommitdiff
path: root/src/usr/imgtrust.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@ipxe.org>2012-03-26 23:24:27 +0100
committerMichael Brown <mcb30@ipxe.org>2012-03-26 23:24:27 +0100
commit2d11a46b716f1d7e3391c82ea7feea39983f81cb (patch)
tree0a46f2db732f3b935a51fa440ce44b2209145fde /src/usr/imgtrust.c
parent5a91f5646aac3456d5be40319129dac5c5f877f0 (diff)
downloadipxe-2d11a46b716f1d7e3391c82ea7feea39983f81cb.zip
ipxe-2d11a46b716f1d7e3391c82ea7feea39983f81cb.tar.gz
ipxe-2d11a46b716f1d7e3391c82ea7feea39983f81cb.tar.bz2
[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 5ea2026..5966078 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;
}