- Ensure you have all required dependencies by running
composer install
. - Run
composer test
at the project's root.
Run composer code-sniff
to check for code style compliance.
-
Install Python 3.8+ and PIP 19+ (not tested on earlier but may work).
-
Set up a virtual environment:
python3 -m venv venv source venv/bin/activate
-
Install dependencies and TUF:
pip install -r requirements.txt
-
Start a
fixtures
directory:mkdir fixtures
-
Initialize the repository and add/sign a target:
repo.py --path=fixtures/ --init --consistent # Defaults to Ed25519 echo "Test File" > testtarget.txt repo.py --path=fixtures/ --add testtarget.txt
-
From
fixtures/tufrepo
:python3 -m http.server 8001
-
From
fixtures/tufclient
:mkdir -p tuftargets curl http://localhost:8001/targets/testtarget.txt > tuftargets/testtarget.txt client.py --repo http://localhost:8001 testtarget.txt # A 404 is expected for N.root.json unless a key has been rotated.