diff options
author | Michael Brown <mcb30@ipxe.org> | 2012-03-26 23:24:27 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2012-03-26 23:24:27 +0100 |
commit | 2d11a46b716f1d7e3391c82ea7feea39983f81cb (patch) | |
tree | 0a46f2db732f3b935a51fa440ce44b2209145fde /src/usr/imgtrust.c | |
parent | 5a91f5646aac3456d5be40319129dac5c5f877f0 (diff) | |
download | ipxe-2d11a46b716f1d7e3391c82ea7feea39983f81cb.tar.gz |
[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.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/usr/imgtrust.c b/src/usr/imgtrust.c index 5ea20265e..596607823 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; } |