``` toto-verify.py --layout <root.layout> --layout-keys <layout-key> ``` """ import sys import argparse import toto.util import toto.verifylib import toto.log as log from toto.models.layout import Layout sys.path.append("../") import TPM tpm = TPM.TPM("../TPM2.csv") my_tpm = TPM.TPM("../TPM.csv") #my_tpm = TPM.TPM("TPM.csv") #my_tpm.clearTPM() def _die(msg, exitcode=1): log.failing(msg) sys.exit(exitcode) def in_toto_verify(layout_path, layout_key_paths): """Loads layout file and layout keys from disk and performs all in-toto verifications."""
import os import sys import subprocess import argparse from shutil import copyfile sys.path.append("../") import TPM # Clear the TPMs at the beginning my_tpm = TPM.TPM("TPM.csv") #my_tpm.clearTPM() tpm = TPM.TPM("../TPM.csv") #tpm.clearTPM() NO_PROMPT = False def prompt_key(prompt): if NO_PROMPT: print "\n" + prompt return inp = False while inp != "": try: inp = raw_input("\n%s -- press any key to continue" % prompt) except Exception, e: pass
-- vi foo.py ``` """ import os import sys import argparse import toto.util import toto.runlib import toto.log as log sys.path.append("../") import TPM tpm = TPM.TPM("../TPM.csv") #tpm = TPM.TPM("TPM.csv") def _die(msg, exitcode=1): log.error(msg) sys.exit(exitcode) def in_toto_run(step_name, key_path, material_list, product_list, link_cmd_args, record_byproducts=False): """Load link signing private keys from disk and runs passed command, storing