-
Notifications
You must be signed in to change notification settings - Fork 135
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adapt test layout template to list keys
Used below snippet to add the updated public keys to the testing layout's keystore and step authorization. Note: Manually removed expiration date to prevent unit tests to fail due to expiration ```python from in_toto import util from in_toto.models import layout bob_pub = util.import_rsa_key_from_file("bob.pub") carl_pub = util.import_rsa_key_from_file("carl.pub") layout_obj = layout.Layout.read_from_file("demo.layout.template") layout_obj.keys = { bob_pub["keyid"]: bob_pub, carl_pub["keyid"]: carl_pub } layout_obj.steps[0].pubkeys = [bob_pub["keyid"]] layout_obj.steps[1].pubkeys = [carl_pub["keyid"]] layout_obj.dump("demo.layout.template") ```
- Loading branch information
Showing
1 changed file
with
24 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters