Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addition of ASN.1 format with BER/DER encoding to TUF #3

Closed
wants to merge 155 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
155 commits
Select commit Hold shift + click to select a range
b2ba018
Initial commit
trishankkarthik Sep 17, 2016
d9b1f99
Initial commit of ASN.1 modules, up to root metadata.
trishankkarthik Sep 17, 2016
4f5e0e8
Add targets metadata.
trishankkarthik Sep 19, 2016
465d5a8
Add snapshot and timestamp metadata.
trishankkarthik Sep 19, 2016
9fa15da
Refine imports for timestamp metadata module.
trishankkarthik Sep 19, 2016
662321f
Use the ISO 8601 format for the date and time.
trishankkarthik Sep 19, 2016
cd331c5
Add another key size for AES.
trishankkarthik Sep 19, 2016
78a217a
Add two more SHA-2 hash functions.
trishankkarthik Sep 19, 2016
8181441
Some updates to the common module.
trishankkarthik Sep 19, 2016
536c76c
Delegations are optional in targets metadata.
trishankkarthik Sep 19, 2016
5b7743c
Custom targets metadata is optional.
trishankkarthik Sep 19, 2016
2a2c8ce
Refinements to targets metadata.
trishankkarthik Sep 20, 2016
8c22d98
Fix Base64String.
trishankkarthik Sep 20, 2016
497748e
Include hexadecimal string in common module.
trishankkarthik Sep 20, 2016
7415512
Add messages for the Bootloader module.
trishankkarthik Sep 21, 2016
a402405
Fix typo.
trishankkarthik Sep 21, 2016
6a8b540
No talk of JSON.
trishankkarthik Sep 21, 2016
d3974e5
Add a module for the time server.
trishankkarthik Sep 21, 2016
4494c69
Add messages for the application module.
trishankkarthik Sep 22, 2016
af128c6
Generalize message about any detected security attack in ECU version …
trishankkarthik Sep 22, 2016
088b9a7
"file server" -> "repository"
trishankkarthik Sep 23, 2016
dbc73de
"director server" -> "director repository"
trishankkarthik Sep 23, 2016
075e31a
Add EXPORTS.
trishankkarthik Sep 23, 2016
d472773
Update root metadata to reflect TAP 5.
trishankkarthik Sep 25, 2016
2350dd3
Remove optional lengths and hashes from snapshot metadata.
trishankkarthik Sep 25, 2016
6aabef0
Remove superfluous imports.
trishankkarthik Sep 25, 2016
2ae977d
Strict file names (i.e., no path separator) in targets and snapshot m…
trishankkarthik Sep 25, 2016
f83125c
Add a trust pinning module.
trishankkarthik Sep 25, 2016
987805d
Allow hard pinning of metadata files for a repository.
trishankkarthik Sep 25, 2016
2093895
Fix typo.
trishankkarthik Sep 27, 2016
9825522
Fixed common module
Sep 28, 2016
73aa546
Fix syntax error in CHOICE.
trishankkarthik Sep 28, 2016
3e5115a
Script to clean up after asn1c.
trishankkarthik Sep 28, 2016
e71f184
Ignore asn1 produced files in git.
trishankkarthik Sep 28, 2016
1619f1f
Minor formatting issues.
trishankkarthik Sep 28, 2016
fd92896
Syntax corrections.
trishankkarthik Sep 29, 2016
e1d9133
Fix IMPORTS syntax error.
trishankkarthik Sep 29, 2016
f9774b0
Fix syntax errors.
trishankkarthik Sep 29, 2016
63f888e
Add compilation scripts; fix a name clash.
trishankkarthik Oct 3, 2016
6a69996
Name CHOICE and ENUMERATED types.
trishankkarthik Oct 4, 2016
119132e
Begin to add encoders.
trishankkarthik Oct 5, 2016
6bf4f71
Add encoder for root metadata.
trishankkarthik Oct 5, 2016
cdb41ae
Add a missing field in CommonModule.Signature.
trishankkarthik Oct 5, 2016
809a984
Add encoder for snapshot metadata.
trishankkarthik Oct 5, 2016
29081eb
Add encoder for the time server.
trishankkarthik Oct 5, 2016
8461692
Fix TargetsModule.
trishankkarthik Oct 6, 2016
6ded660
Recompile pyasn1 module to reflect latest TargetsModule.
trishankkarthik Oct 6, 2016
938076c
Better reading through indexing.
trishankkarthik Oct 6, 2016
e841720
Add encoder for targets metadata on the supplier repository.
trishankkarthik Oct 6, 2016
1caee1c
Add encoder for targets metadata on the director repository.
trishankkarthik Oct 6, 2016
c00d66e
Add encoder for bootloader module messages.
trishankkarthik Oct 6, 2016
80eabe1
Add (ugly) encoders for the application module.
trishankkarthik Oct 6, 2016
ab849bd
Attach a metadata file in message. Hooray!
trishankkarthik Oct 7, 2016
2957752
No need for objecthash.
trishankkarthik Oct 8, 2016
6646388
Switch encoding from CER to BER for simplicity in decoding.
trishankkarthik Oct 8, 2016
b9b7ad9
Lower and upper bounds on all strings.
trishankkarthik Oct 8, 2016
4ea7d81
Specify lower and upper bounds for every SEQUENCE OF element.
trishankkarthik Oct 8, 2016
fc9ec6a
Test and fix encoders for metadata verification module.
trishankkarthik Oct 8, 2016
3e302bf
Test and fix encoders for the time server module.
trishankkarthik Oct 8, 2016
9bcb720
Test and fix encoder for bootloader module.
trishankkarthik Oct 8, 2016
301ec27
Test and fix encoder for application module.
trishankkarthik Oct 8, 2016
fd20834
Specify a length to the use of every SEQUENCE OF element.
trishankkarthik Oct 8, 2016
3cf45ca
Fix encoder for timestamp metadata.
trishankkarthik Oct 9, 2016
ee55a42
Fix encoder for snapshot metadata.
trishankkarthik Oct 9, 2016
7957e29
Fix encoder for root metadata.
trishankkarthik Oct 9, 2016
f8fa794
Fix encoder for targets metadata on director repository.
trishankkarthik Oct 9, 2016
402ccea
Backtrack, and simplify the specification of lengths of SEQUENCE OFs.
trishankkarthik Oct 9, 2016
515cbdd
Fix encoder for timestamp metadata.
trishankkarthik Oct 9, 2016
a09ed18
Fix encoder for snapshot metadata.
trishankkarthik Oct 9, 2016
5efce09
Fix encoder for root metadata.
trishankkarthik Oct 9, 2016
efbd89a
Fix encoder for targets metadata on director repository.
trishankkarthik Oct 9, 2016
bd602aa
Fix encoder for targets metadata on supplier repository.
trishankkarthik Oct 9, 2016
2f605cc
Fix encoder for time server module.
trishankkarthik Oct 9, 2016
0255f2e
Fix encoder for bootloader module.
trishankkarthik Oct 9, 2016
a291738
Fix encoder for application module.
trishankkarthik Oct 9, 2016
15699e2
Demo day hacks cleanup (#7)
trishankkarthik Oct 15, 2016
0037b2b
Add __init__.py.
trishankkarthik Oct 15, 2016
0c2115a
Conform to uptane.formats.VEHICLE_VERSION_MANIFEST_SCHEMA.
trishankkarthik Oct 15, 2016
c70b375
Edits to documentation.
trishankkarthik Oct 17, 2016
cf43752
Fix typo.
trishankkarthik Nov 22, 2016
979569a
Allow an empty sequence of URLs.
trishankkarthik Dec 18, 2016
4301f65
Update TargetsModule to reflect TAP 3.
trishankkarthik Dec 18, 2016
d327c1a
Every image *must* be associated with a version number.
trishankkarthik Dec 19, 2016
42a930a
Put the release counter, and hardware type, of images in the custom t…
trishankkarthik Dec 22, 2016
13395db
Update the targets metadata encoder.
trishankkarthik Dec 22, 2016
f7e043a
Change the ECU hardware type from str to uint.
trishankkarthik Dec 23, 2016
c22823e
Fix minor "typo".
trishankkarthik Dec 23, 2016
8ba1827
Update README.py
trishankkarthik Dec 23, 2016
0a5657b
Update map file, and snapshot metadata modules.
trishankkarthik Dec 25, 2016
aba4352
Replace "mirror" with "server".
trishankkarthik Dec 25, 2016
1796af2
Replace "mirror" with "server".
trishankkarthik Dec 25, 2016
b50aba8
Merge messages used by ECUs into one module.
trishankkarthik Dec 26, 2016
5f6d97a
Update README instructions.
trishankkarthik Dec 26, 2016
3927e4e
Replace "nonce" with "token".
trishankkarthik Dec 27, 2016
ef1d64f
Attach warning about improper decoding of ASN.1
trishankkarthik Dec 31, 2016
ff6df49
After forum discussion, change hardware type from int to str.
trishankkarthik Jan 4, 2017
3812121
Rename "supplier" to "image" repository.
trishankkarthik Jan 18, 2017
07a44b9
Fix bug for @awwad.
trishankkarthik Jan 27, 2017
017c43b
WIP on using only bit/octet instead of hex/base64 strings.
trishankkarthik Jan 30, 2017
8103951
Finish work on using only bit/octet instead of hex/base64 strings.
trishankkarthik Jan 31, 2017
f551bfb
read in BER files in tuf.util, into the existing Python dict TUF form…
awwad Feb 3, 2017
7124c1b
functions to interpret BER-encoded ASN.1 files into Python dictionari…
awwad Feb 7, 2017
52ec90f
code to allow verification of signatures over BER by performing a re-…
awwad Feb 7, 2017
d52ec9a
addition of the asn1 and BER codec used by previous commits; please n…
awwad Feb 7, 2017
e605944
make the client updater compatible with the new BER format
awwad Feb 7, 2017
25de9c8
server-side tools (repository tool and underlying module) compatibili…
awwad Feb 7, 2017
3c66026
pruning: removing everything from asn1 import that is not currently n…
awwad Feb 7, 2017
6087cfb
merging in definitions of asn1 metadata from Trishank's asn1 repo
awwad Feb 7, 2017
08f482f
switching use of ASN.1 encoding modules from Uptane's to TUF's
awwad Feb 7, 2017
7ba9584
fixing asn1 imports to work within TUF
awwad Feb 7, 2017
7cb3383
fixing a bug in asn1 converter for Targets metadata
awwad Feb 7, 2017
b50e74e
fixing problem with ASN.1 timestamp conversion: assumption about file…
awwad Feb 7, 2017
c80d9cb
fixing asn1 imports to work within TUF: additional missed import
awwad Feb 7, 2017
4d6955d
minor bugfix in new code in tuf/util: bad variable name
awwad Feb 8, 2017
f3936a9
add logging to asn1_ber_codec and remove an extraneous line
awwad Feb 8, 2017
79a2766
make encoding a package
awwad Feb 8, 2017
6d9e2fb
correcting imports to use tuf-internal ASN.1 metadata definitions ins…
awwad Feb 8, 2017
9e6ed31
minor: filemode changes to ASN.1 metadata definition files, -x
awwad Feb 8, 2017
3b3e721
bug fixes to the asn1 imports from the most recent asn1 code (@trisha…
awwad Feb 8, 2017
c01ac76
Adapting code to deal with switch to Octal in ASN.1/BER
awwad Feb 8, 2017
85e7129
repository_lib must participate in conversion of metadata to BER befo…
awwad Feb 8, 2017
420f5ef
Exempt BER metadata from the JSON-specific canonicalization routines …
awwad Feb 8, 2017
e59e30a
Bugfix: addresses a slight but breaking inconsistency between ASN.1/B…
awwad Feb 8, 2017
58973be
add instructions on generation of metadataverificationmodule.py from …
awwad Feb 13, 2017
6c99c3b
removal of minor bug and extraneous comment line in Signature definit…
awwad Feb 13, 2017
45b7a59
tuf.util: ber load functions skip utf-8 decode and json load function…
awwad Feb 27, 2017
25efc25
minor: timestamp metadata: snapshot filename bracketed in a str() cal…
awwad Feb 27, 2017
69c8f46
minor: additional instructions for production of metadataverification…
awwad Feb 27, 2017
408dc86
skeleton for better custom fileinfo handling in asn1 conversion of ta…
awwad Feb 27, 2017
773fd20
asn1 conversion bugfix: switching to octet strings broke keyid handli…
awwad Feb 27, 2017
08e6a10
Rewrote snapshotmetadata.py to properly support TUF snapshot metadata:
awwad Feb 27, 2017
78a4795
utf-8 encode/decode only where appropriate - change accompanies previ…
awwad Feb 27, 2017
d5b9ada
add check for format of fileinfo_schema; additional comments
awwad Feb 27, 2017
b5becc9
allow explicit signing of Python dictionaries even when TUF is using …
awwad Feb 27, 2017
f13a07d
fix octetString handling of signature keyids; update position of sign…
awwad Feb 27, 2017
08bc05e
style: replace list comprehension with list instantiation; add a vari…
awwad Feb 27, 2017
a416ee8
testing: add preliminary testing for encoding TUF metadata; add Uptan…
awwad Feb 27, 2017
bf5051e
fix typo: use included TUF asn1 module instead of external (Uptane)
awwad Feb 27, 2017
5b10182
switch from BER to DER; next commits will perform renaming; this one …
awwad Feb 27, 2017
ecdecf5
BER to DER - renames only; accompanies previous commit
awwad Feb 27, 2017
f072c09
restore default TUF format to JSON; it can be switched to DER in tuf/…
awwad Feb 27, 2017
8440e82
doc: minor: typo in comment
awwad Feb 28, 2017
3324968
doc: explanation comments for some difficult-to-grok code; removal of…
awwad Mar 2, 2017
f9cb924
Doc: Better docstrings for tuf.util.load_der_string, tuf.util.load_de…
awwad Mar 6, 2017
464ffb8
minor: change name of module references in asn1_codec to be more intu…
awwad Mar 6, 2017
892c0bc
minor: clarify error string in repository_lib where METADATA_FORMAT i…
awwad Mar 6, 2017
24b4b54
Remove unused draft ASN.1 code
awwad Mar 10, 2017
dd78521
Rename unintuitively named ASN.1 conversion modules
awwad Mar 10, 2017
6462cbc
Reverts erroneous line change to fix bug in Python3
awwad Mar 15, 2017
db4d510
Support Python3 in ASN.1/DER
awwad Mar 16, 2017
eed6d48
Fix signing over ASN.1/DER in Python3
awwad Mar 17, 2017
b4f3579
Reverts commit eed6d48 to undo Python2 demo breakage
awwad Mar 21, 2017
f787745
Add validation and docstring for optional arg
awwad Mar 22, 2017
79aabd2
Python3 compatibility precaution: unicode_literals
awwad Mar 22, 2017
4bac516
Import from future everywhere for Py2/3 compat
awwad Mar 22, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# root level directories
dist/*
build/*

*~
# global file patterns
*.log
*.pyc
Expand All @@ -12,4 +12,4 @@ build/*
.coverage
.tox/*
tests/htmlcov/*
.DS_Store
.DS_Store
54 changes: 54 additions & 0 deletions tests/repository_data/targets_simpler.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Metadata files used by the tests are usually saved in tests/repository_data/repository/*. Is there a reason why they are saved in repository_data/*?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The files in tests/repository_data/repository/ constitute the metadata files that represent a single consistent repository. These new files are not related to that specific repository. I didn't want them to be confused, and since this is temporary, tests/repository_data felt adequate. I would like ultimately to use test files from several repositories, each in a directory in repository_data corresponding to their repository name, with all metadata files required for that repository, so that we can test them in full with the map file.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Do you think it would be better to just stick them in with the 'repository' stuff?)

Copy link
Collaborator

@vladimir-v-diaz vladimir-v-diaz Feb 28, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking of having separate directories (e.g., tests/repository_data/repository, tests/repository_data/director) to test the map file. In PR #430 separate directories are created on the client side, but multiple server instances (on different ports) are started over the same tests/repository_data/repository data, which would be more ideal.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

correction: "which is not ideal... we should also have separate repositories on the server side"

"signatures": [
],
"signed": {
"_type": "Targets",
"delegations": {
"keys": {
"a0650f29dde63403cc4eec28a1c66f2262d6339434a01c63a881a48bedd9bca9": {
"keyid_hash_algorithms": [
"sha256",
"sha512"
],
"keytype": "ed25519",
"keyval": {
"public": "3b11296fe2dba14a2ef204e542e9e4195293bcf3042655e3d7e4ef5afe3cf36a"
}
}
},
"roles": [
{
"backtrack": true,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This attribute was renamed to "terminating". This set of metadata will have to be regenerated if merging with TUF's repository.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's true. One of sadly many things that will have to be adjusted when the merge happens.

"keyids": [
"a0650f29dde63403cc4eec28a1c66f2262d6339434a01c63a881a48bedd9bca9"
],
"name": "role1",
"paths": [
"/file3.txt"
],
"threshold": 1
}
]
},
"expires": "2030-01-01T00:00:00Z",
"targets": {
"/file1.txt": {
"custom": {
},
"hashes": {
"sha256": "65b8c67f51c993d898250f40aa57a317d854900b3a04895464313e48785440da",
"sha512": "467430a68afae8e9f9c0771ea5d78bf0b3a0d79a2d3d3b40c69fde4dd42c461448aef76fcef4f5284931a1ffd0ac096d138ba3a0d6ca83fa8d7285a47a296f77"
},
"length": 31
},
"/file2.txt": {
"hashes": {
"sha256": "452ce8308500d83ef44248d8e6062359211992fd837ea9e370e561efb1a4ca99",
"sha512": "052b49a21e03606b28942db69aa597530fe52d47ee3d748ba65afcd14b857738e36bc1714c4f4adde46c3e683548552fe5c96722e0e0da3acd9050c2524902d8"
},
"length": 39
}
},
"version": 1
}
}
86 changes: 86 additions & 0 deletions tests/repository_data/uptane_director_root.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Root metadata is now always written as if if consistent snapshots = True. Therefore, expect to have 1.uptane_director_root.json, 2.uptane_director_root.json for this repository.

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That was a change made after the fork occurred, and will be another thing to unite in the merge.

"signatures": [
{
"keyid": "fdba7eaa358fa5a8113a789f60c4a6ce29c4478d8d8eff3e27d1d77416696ab2",
"method": "ed25519",
"sig": "3c976bc1cd315cf0b6653a2fa5770a4e62a1c4b6f87b68390caa378aa5bd5f3d63a13ebaf3c6d1fa886c837023b5a760161c6cf47ed0ac5681977d629e2a7706"
}
],
"signed": {
"_type": "Root",
"compression_algorithms": [
"gz"
],
"consistent_snapshot": false,
"expires": "2018-02-23T14:09:29Z",
"keys": {
"630cf584f392430b2119a4395e39624e86f5e5c5374507a789be5cf35bf090d6": {
"keyid_hash_algorithms": [
"sha256",
"sha512"
],
"keytype": "ed25519",
"keyval": {
"public": "99ef8790687ca252c4677a80a34e401efb7e17ccdf9b0fcb5f1bc3260c432cb9"
}
},
"da9c65c96c5c4072f6984f7aa81216d776aca6664d49cb4dfafbc7119320d9cc": {
"keyid_hash_algorithms": [
"sha256",
"sha512"
],
"keytype": "ed25519",
"keyval": {
"public": "d1ab5126fd6f0e30944910e81c0448044dfe9d5a39f478212b2afa913bb7ca7c"
}
},
"f93cfcf33d335ff43654ec6047e0a18dd5595ee3de53136b94c9c756788a0f97": {
"keyid_hash_algorithms": [
"sha256",
"sha512"
],
"keytype": "ed25519",
"keyval": {
"public": "228342cc8b78a65b8840ef5691a693d8c368e053a7e8e8f85faf7c83eff1e1d2"
}
},
"fdba7eaa358fa5a8113a789f60c4a6ce29c4478d8d8eff3e27d1d77416696ab2": {
"keyid_hash_algorithms": [
"sha256",
"sha512"
],
"keytype": "ed25519",
"keyval": {
"public": "f3b4c231520580eca92e17ae1581a708f606f72d43cc200af493afeec22a5e79"
}
}
},
"roles": {
"root": {
"keyids": [
"fdba7eaa358fa5a8113a789f60c4a6ce29c4478d8d8eff3e27d1d77416696ab2"
],
"threshold": 1
},
"snapshot": {
"keyids": [
"f93cfcf33d335ff43654ec6047e0a18dd5595ee3de53136b94c9c756788a0f97"
],
"threshold": 1
},
"targets": {
"keyids": [
"630cf584f392430b2119a4395e39624e86f5e5c5374507a789be5cf35bf090d6"
],
"threshold": 1
},
"timestamp": {
"keyids": [
"da9c65c96c5c4072f6984f7aa81216d776aca6664d49cb4dfafbc7119320d9cc"
],
"threshold": 1
}
},
"version": 1
}
}
26 changes: 26 additions & 0 deletions tests/repository_data/uptane_director_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this valid metadata? Not all metadata is listed in the snapshot metadata, at least as named on disk. For example, why don't I see targets_simpler.json listed anywhere?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

targets_simpler.json isn't part of a complete test repository's data, no; it's for an individual test prodding just targets.json.

The other files are parts of repositories and are prefixed with the repository of which they're a part:

  • uptane_director_root.json
  • uptane_director_snapshot.json
  • ...
  • uptane_mainrepo_root.json
  • ...

Should they remain (if we decide Uptane gets that kind of privilege - instead of generalizing a bit), we'd want them in folders in repository_data like this:

  • repository_data/uptane_director:
    • root.json
    • ...
  • repository_data/uptane_imagerepo:
    • root.json
    • ...
  • repository_data/repository: <--- may or may not want to rename to 'simple', 'default', etc.
    • root.json
    • ...
  • repository_data/der_repository:
    • root.der
    • ...

"signatures": [
{
"keyid": "f93cfcf33d335ff43654ec6047e0a18dd5595ee3de53136b94c9c756788a0f97",
"method": "ed25519",
"sig": "ee9675446badfbbbd5cc75879e3eaca29ec66b81b3bef46591b35a38995cde236c4222b3808703604c6a370f291f77087e0563b322fd2878ecdd98e862989102"
}
],
"signed": {
"_type": "Snapshot",
"expires": "2017-03-02T08:21:09Z",
"meta": {
"root.json": {
"hashes": {
"sha256": "4330149665845ae1fe3fd032919b6ca84bf5734e06cf9a77bb3045cbdc048ea2"
},
"length": 2120,
"version": 1
},
"targets.json": {
"version": 4
}
},
"version": 4
}
}
30 changes: 30 additions & 0 deletions tests/repository_data/uptane_director_targets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"signatures": [
{
"keyid": "630cf584f392430b2119a4395e39624e86f5e5c5374507a789be5cf35bf090d6",
"method": "ed25519",
"sig": "2c666bef10bed0044996b20ed4ad58bc857933f70a4e8a8a39ddda333b966adc80d4145550cc9655d8a1f417389e6aef4a66f7b0fcefd87a301d2e08ba591c04"
}
],
"signed": {
"_type": "Targets",
"delegations": {
"keys": {},
"roles": []
},
"expires": "2017-05-25T15:48:19Z",
"targets": {
"/file5.txt": {
"custom": {
"ecu_serial": "22222"
},
"hashes": {
"sha256": "4454deec0e2677f07ff94a2e2ad61257858dd2e30d1998589bbd29cda235819b",
"sha512": "03883cb480f0bab47137f53930dfc6a2bb6a99ff78876dbb55b6471f4b47d8f827e7b429cf50c1663a267da99a64cc0c53cacd77ab594cfea00dc64d817bf7a0"
},
"length": 23
}
},
"version": 4
}
}
23 changes: 23 additions & 0 deletions tests/repository_data/uptane_director_timestamp.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"signatures": [
{
"keyid": "da9c65c96c5c4072f6984f7aa81216d776aca6664d49cb4dfafbc7119320d9cc",
"method": "ed25519",
"sig": "58fce6144232c2a5db8bfdbd69919d3ba5ba8d2bae5d3dc6289adfda7e5c8dbf1c11a0a0438e0593debbe323bcfe7a5f89f190785146547d058747bdfb0f0506"
}
],
"signed": {
"_type": "Timestamp",
"expires": "2017-02-24T08:21:09Z",
"meta": {
"snapshot.json": {
"hashes": {
"sha256": "44e0c77ca9c3eb9ed89e9e1cbfa5952599cfb120aeaf01ff0ca6fde14357ef94"
},
"length": 594,
"version": 4
}
},
"version": 4
}
}
34 changes: 34 additions & 0 deletions tests/repository_data/uptane_mainrepo_role1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"signatures": [
{
"keyid": "8650aed05799a74f5febc9070c5d3e58d62797662d48062614b1ce0a643ee368",
"method": "ed25519",
"sig": "8539db3e2650e2b9a5d3fbd1b99f018ebe35f837986545389e4f3dbb73fa3ed1f32563943fdd4cd8a600a520def711adc7afbe4a0f807cf08124092de9f92403"
}
],
"signed": {
"_type": "Targets",
"delegations": {
"keys": {},
"roles": []
},
"expires": "2017-05-25T14:43:13Z",
"targets": {
"/file1.txt": {
"hashes": {
"sha256": "1afd3c7dc6b40bd41e43befe8d03f7ddbf22349aea3bfdf038d87fd9a5b64cbb",
"sha512": "5fa900c0d81a4990124f5276d0cfd7efee37e19c306b16a33f06cba7275e35cb3bb955e0906af7b8848f09ca3786b285282f64379f8c4bc505151bb3bd2aa8ce"
},
"length": 21
},
"/infotainment_firmware.txt": {
"hashes": {
"sha256": "6b9f987226610bfed08b824c93bf8b2f59521fce9a2adef80c495f363c1c9c44",
"sha512": "706c283972c5ae69864b199e1cdd9b4b8babc14f5a454d0fd4d3b35396a04ca0b40af731671b74020a738b5108a78deb032332c36d6ae9f31fae2f8a70f7e1ce"
},
"length": 37
}
},
"version": 1
}
}
86 changes: 86 additions & 0 deletions tests/repository_data/uptane_mainrepo_root.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
{
"signatures": [
{
"keyid": "94c836f0c45168f0a437eef0e487b910f58db4d462ae457b5730a4487130f290",
"method": "ed25519",
"sig": "713fa9c7e5e615204a70fac380aa8dacd723753cbf6e4bf7faea2c3bc544028e37d014ca77c81a91b894f6479f111cb9ab69861ce9b4d3a61f8e2efde64f4408"
}
],
"signed": {
"_type": "Root",
"compression_algorithms": [
"gz"
],
"consistent_snapshot": false,
"expires": "2018-02-23T13:04:12Z",
"keys": {
"6fcd9a928358ad8ca7e946325f57ec71d50cb5977a8d02c5ab0de6765fef040a": {
"keyid_hash_algorithms": [
"sha256",
"sha512"
],
"keytype": "ed25519",
"keyval": {
"public": "97c1112bbd9047b1fdb50dd638bfed6d0639e0dff2c1443f5593fea40e30f654"
}
},
"94c836f0c45168f0a437eef0e487b910f58db4d462ae457b5730a4487130f290": {
"keyid_hash_algorithms": [
"sha256",
"sha512"
],
"keytype": "ed25519",
"keyval": {
"public": "f4ac8d95cfdf65a4ccaee072ba5a48e8ad6a0c30be6ffd525aec6bc078211033"
}
},
"aaf05f8d054f8068bf6cb46beed7c824e2560802df462fc8681677586582ca99": {
"keyid_hash_algorithms": [
"sha256",
"sha512"
],
"keytype": "ed25519",
"keyval": {
"public": "497f62d80e5b892718da8788bb549bcf8369a1460ec23d6d67d0ca099a8e8f83"
}
},
"c24b457b2ca4b3c2f415efdbbebb914a0d05c5345b9889bda044362589d6f596": {
"keyid_hash_algorithms": [
"sha256",
"sha512"
],
"keytype": "ed25519",
"keyval": {
"public": "729d9cb5f74688ef8e9a22fae1516f33ff98c7910b64bf3b66e6cfc51559840e"
}
}
},
"roles": {
"root": {
"keyids": [
"94c836f0c45168f0a437eef0e487b910f58db4d462ae457b5730a4487130f290"
],
"threshold": 1
},
"snapshot": {
"keyids": [
"aaf05f8d054f8068bf6cb46beed7c824e2560802df462fc8681677586582ca99"
],
"threshold": 1
},
"targets": {
"keyids": [
"c24b457b2ca4b3c2f415efdbbebb914a0d05c5345b9889bda044362589d6f596"
],
"threshold": 1
},
"timestamp": {
"keyids": [
"6fcd9a928358ad8ca7e946325f57ec71d50cb5977a8d02c5ab0de6765fef040a"
],
"threshold": 1
}
},
"version": 1
}
}
29 changes: 29 additions & 0 deletions tests/repository_data/uptane_mainrepo_snapshot.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"signatures": [
{
"keyid": "aaf05f8d054f8068bf6cb46beed7c824e2560802df462fc8681677586582ca99",
"method": "ed25519",
"sig": "f4f4fe959893ca54d2341deca26f49af725c8873e8ff03640575033edbfea6f36626ef8536d54ad0ac612de01424f74dd801ba6fc61a99ef5e66c41d08877e0d"
}
],
"signed": {
"_type": "Snapshot",
"expires": "2017-03-02T07:15:52Z",
"meta": {
"role1.json": {
"version": 1
},
"root.json": {
"hashes": {
"sha256": "60e7e25689e021594e2123df0083a4ce9926ec508a60eae3e97918e66537845f"
},
"length": 2120,
"version": 1
},
"targets.json": {
"version": 2
}
},
"version": 2
}
}
Loading