]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[image] Log results of image signature checks
authorMichael Brown <mcb30@ipxe.org>
Mon, 26 Mar 2012 22:24:27 +0000 (23:24 +0100)
committerMichael Brown <mcb30@ipxe.org>
Mon, 26 Mar 2012 22:24:27 +0000 (23:24 +0100)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/usr/imgtrust.c

index 5ea20265e3a957f84201d76b2aed138c38a8114e..596607823ac46043408a234c7c2a6f24d3351e84 100644 (file)
@@ -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;
 }