build and verify on disk file integrity of pluto and charon executables

This commit is contained in:
Martin Willi
2009-06-22 15:47:18 +02:00
parent da2834a280
commit 4f2c48cd3d
4 changed files with 43 additions and 14 deletions
+7
View File
@@ -264,6 +264,13 @@ int main(int argc, char **argv)
{
abort();
}
if (lib->integrity &&
!lib->integrity->check_file(lib->integrity, "pluto", argv[0]))
{
fprintf(stderr, "integrity check of pluto failed\n");
library_deinit();
abort();
}
options = options_create();
/* handle arguments */