瀏覽代碼

[image] Log results of image signature checks

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 年之前
父節點
當前提交
2d11a46b71
共有 1 個檔案被更改,包括 9 行新增0 行删除
  1. 9
    0
      src/usr/imgtrust.c

+ 9
- 0
src/usr/imgtrust.c 查看文件

@@ -21,6 +21,7 @@ FILE_LICENCE ( GPL2_OR_LATER );
21 21
 #include <stdlib.h>
22 22
 #include <errno.h>
23 23
 #include <time.h>
24
+#include <syslog.h>
24 25
 #include <ipxe/uaccess.h>
25 26
 #include <ipxe/image.h>
26 27
 #include <ipxe/cms.h>
@@ -72,10 +73,18 @@ int imgverify ( struct image *image, struct image *signature,
72 73
 
73 74
 	/* Mark image as trusted */
74 75
 	image_trust ( image );
76
+	syslog ( LOG_NOTICE, "Image \"%s\" signature OK\n", image->name );
77
+
78
+	/* Free internal copy of signature */
79
+	free ( data );
80
+
81
+	return 0;
75 82
 
76 83
  err_verify:
77 84
  err_parse:
78 85
 	free ( data );
79 86
  err_alloc:
87
+	syslog ( LOG_ERR, "Image \"%s\" signature bad: %s\n",
88
+		 image->name, strerror ( rc ) );
80 89
 	return rc;
81 90
 }

Loading…
取消
儲存