-
Notifications
You must be signed in to change notification settings - Fork 3
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
Changes from all commits
b2ba018
d9b1f99
4f5e0e8
465d5a8
9fa15da
662321f
cd331c5
78a217a
8181441
536c76c
5b7743c
2a2c8ce
8c22d98
497748e
7415512
a402405
6a8b540
d3974e5
4494c69
af128c6
088b9a7
dbc73de
075e31a
d472773
2350dd3
6aabef0
2ae977d
f83125c
987805d
2093895
9825522
73aa546
3e5115a
e71f184
1619f1f
fd92896
e1d9133
f9774b0
63f888e
6a69996
119132e
6bf4f71
cdb41ae
809a984
29081eb
8461692
6ded660
938076c
e841720
1caee1c
c00d66e
80eabe1
ab849bd
2957752
6646388
b9b7ad9
4ea7d81
fc9ec6a
3e302bf
9bcb720
301ec27
fd20834
3cf45ca
ee55a42
7957e29
f8fa794
402ccea
515cbdd
a09ed18
5efce09
efbd89a
bd602aa
2f605cc
0255f2e
a291738
15699e2
0037b2b
0c2115a
c70b375
cf43752
979569a
4301f65
d327c1a
42a930a
13395db
f7e043a
c22823e
8ba1827
0a5657b
aba4352
1796af2
b50aba8
5f6d97a
3927e4e
ef1d64f
ff6df49
3812121
07a44b9
017c43b
8103951
f551bfb
7124c1b
52ec90f
d52ec9a
e605944
25de9c8
3c66026
6087cfb
08f482f
7ba9584
7cb3383
b50e74e
c80d9cb
4d6955d
f3936a9
79a2766
6d9e2fb
9e6ed31
3b3e721
c01ac76
85e7129
420f5ef
e59e30a
58973be
6c99c3b
45b7a59
25efc25
69c8f46
408dc86
773fd20
08e6a10
78a4795
d5b9ada
b5becc9
f13a07d
08bc05e
a416ee8
bf5051e
5b10182
ecdecf5
f072c09
8440e82
3324968
f9cb924
464ffb8
892c0bc
24b4b54
dd78521
6462cbc
db4d510
eed6d48
b4f3579
f787745
79aabd2
4bac516
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
{ | ||
"signatures": [ | ||
], | ||
"signed": { | ||
"_type": "Targets", | ||
"delegations": { | ||
"keys": { | ||
"a0650f29dde63403cc4eec28a1c66f2262d6339434a01c63a881a48bedd9bca9": { | ||
"keyid_hash_algorithms": [ | ||
"sha256", | ||
"sha512" | ||
], | ||
"keytype": "ed25519", | ||
"keyval": { | ||
"public": "3b11296fe2dba14a2ef204e542e9e4195293bcf3042655e3d7e4ef5afe3cf36a" | ||
} | ||
} | ||
}, | ||
"roles": [ | ||
{ | ||
"backtrack": true, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 There was a problem hiding this comment. Choose a reason for hiding this commentThe 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:
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:
|
||
"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 | ||
} | ||
} |
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 | ||
} | ||
} |
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 | ||
} | ||
} |
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 | ||
} | ||
} |
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 | ||
} | ||
} |
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 | ||
} | ||
} |
There was a problem hiding this comment.
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 inrepository_data/*
?There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?)
There was a problem hiding this comment.
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 sametests/repository_data/repository
data, which would be more ideal.There was a problem hiding this comment.
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"