mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-06-22 05:04:25 -04:00
Move mkosi folder to old image folder location
This commit is contained in:
parent
24f3371cf6
commit
35e2267cf9
91 changed files with 27 additions and 214 deletions
21
image/measured-boot/extract_authentihash.py
Executable file
21
image/measured-boot/extract_authentihash.py
Executable file
|
@ -0,0 +1,21 @@
|
|||
#!/usr/bin/env python
|
||||
# Copyright (c) Edgeless Systems GmbH
|
||||
#
|
||||
# SPDX-License-Identifier: AGPL-3.0-only
|
||||
|
||||
# This script calculates the authentihash of a PE / EFI binary.
|
||||
# Install prerequisites:
|
||||
# pip install lief
|
||||
|
||||
import sys
|
||||
import lief
|
||||
|
||||
def authentihash(filename):
|
||||
pe = lief.parse(filename)
|
||||
return pe.authentihash(lief.PE.ALGORITHMS.SHA_256)
|
||||
|
||||
if __name__ == '__main__':
|
||||
if len(sys.argv) != 2:
|
||||
print(f"Usage: {sys.argv[0]} <filename>")
|
||||
sys.exit(1)
|
||||
print(authentihash(sys.argv[1]).hex())
|
Loading…
Add table
Add a link
Reference in a new issue