Browse Source

[image] Log results of image signature checks

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 years ago
parent
commit
2d11a46b71
1 changed files with 9 additions and 0 deletions
  1. 9
    0
      src/usr/imgtrust.c

+ 9
- 0
src/usr/imgtrust.c View File

21
 #include <stdlib.h>
21
 #include <stdlib.h>
22
 #include <errno.h>
22
 #include <errno.h>
23
 #include <time.h>
23
 #include <time.h>
24
+#include <syslog.h>
24
 #include <ipxe/uaccess.h>
25
 #include <ipxe/uaccess.h>
25
 #include <ipxe/image.h>
26
 #include <ipxe/image.h>
26
 #include <ipxe/cms.h>
27
 #include <ipxe/cms.h>
72
 
73
 
73
 	/* Mark image as trusted */
74
 	/* Mark image as trusted */
74
 	image_trust ( image );
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
  err_verify:
83
  err_verify:
77
  err_parse:
84
  err_parse:
78
 	free ( data );
85
 	free ( data );
79
  err_alloc:
86
  err_alloc:
87
+	syslog ( LOG_ERR, "Image \"%s\" signature bad: %s\n",
88
+		 image->name, strerror ( rc ) );
80
 	return rc;
89
 	return rc;
81
 }
90
 }

Loading…
Cancel
Save