Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[image] Log results of image signature checks
Signed-off-by: Michael Brown <mcb30@ipxe.org>
  • Loading branch information
mcb30 committed Mar 26, 2012
1 parent 5a91f56 commit 2d11a46
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/usr/imgtrust.c
Expand Up @@ -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>
Expand Down Expand Up @@ -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;
}

0 comments on commit 2d11a46

Please sign in to comment.