@@ -40,21 +40,21 @@ func TestMarshalCheckpoint(t *testing.T) {
4040 }{
4141 {
4242 c : Checkpoint {
43- Ecosystem : "Log Checkpoint v0" ,
44- Size : 123 ,
45- Hash : []byte ("bananas" ),
43+ Origin : "Log Checkpoint v0" ,
44+ Size : 123 ,
45+ Hash : []byte ("bananas" ),
4646 },
4747 want : "Log Checkpoint v0\n 123\n YmFuYW5hcw==\n " ,
4848 }, {
4949 c : Checkpoint {
50- Ecosystem : "Banana Checkpoint v5" ,
51- Size : 9944 ,
52- Hash : []byte ("the view from the tree tops is great!" ),
50+ Origin : "Banana Checkpoint v5" ,
51+ Size : 9944 ,
52+ Hash : []byte ("the view from the tree tops is great!" ),
5353 },
5454 want : "Banana Checkpoint v5\n 9944\n dGhlIHZpZXcgZnJvbSB0aGUgdHJlZSB0b3BzIGlzIGdyZWF0IQ==\n " ,
5555 }, {
5656 c : Checkpoint {
57- Ecosystem : "Banana Checkpoint v7" ,
57+ Origin : "Banana Checkpoint v7" ,
5858 Size : 9943 ,
5959 Hash : []byte ("the view from the tree tops is great!" ),
6060 OtherContent : []string {"foo" , "bar" },
@@ -85,23 +85,23 @@ func TestUnmarshalCheckpoint(t *testing.T) {
8585 desc : "valid one" ,
8686 m : "Log Checkpoint v0\n 123\n YmFuYW5hcw==\n " ,
8787 want : Checkpoint {
88- Ecosystem : "Log Checkpoint v0" ,
89- Size : 123 ,
90- Hash : []byte ("bananas" ),
88+ Origin : "Log Checkpoint v0" ,
89+ Size : 123 ,
90+ Hash : []byte ("bananas" ),
9191 },
9292 }, {
9393 desc : "valid with different ecosystem" ,
9494 m : "Banana Checkpoint v1\n 9944\n dGhlIHZpZXcgZnJvbSB0aGUgdHJlZSB0b3BzIGlzIGdyZWF0IQ==\n " ,
9595 want : Checkpoint {
96- Ecosystem : "Banana Checkpoint v1" ,
97- Size : 9944 ,
98- Hash : []byte ("the view from the tree tops is great!" ),
96+ Origin : "Banana Checkpoint v1" ,
97+ Size : 9944 ,
98+ Hash : []byte ("the view from the tree tops is great!" ),
9999 },
100100 }, {
101101 desc : "valid with trailing data" ,
102102 m : "Log Checkpoint v0\n 9944\n dGhlIHZpZXcgZnJvbSB0aGUgdHJlZSB0b3BzIGlzIGdyZWF0IQ==\n Here's some associated data.\n " ,
103103 want : Checkpoint {
104- Ecosystem : "Log Checkpoint v0" ,
104+ Origin : "Log Checkpoint v0" ,
105105 Size : 9944 ,
106106 Hash : []byte ("the view from the tree tops is great!" ),
107107 OtherContent : []string {"Here's some associated data." },
@@ -110,7 +110,7 @@ func TestUnmarshalCheckpoint(t *testing.T) {
110110 desc : "valid with multiple trailing data lines" ,
111111 m : "Log Checkpoint v0\n 9944\n dGhlIHZpZXcgZnJvbSB0aGUgdHJlZSB0b3BzIGlzIGdyZWF0IQ==\n lots\n of\n lines\n " ,
112112 want : Checkpoint {
113- Ecosystem : "Log Checkpoint v0" ,
113+ Origin : "Log Checkpoint v0" ,
114114 Size : 9944 ,
115115 Hash : []byte ("the view from the tree tops is great!" ),
116116 OtherContent : []string {"lots" , "of" , "lines" },
@@ -119,9 +119,9 @@ func TestUnmarshalCheckpoint(t *testing.T) {
119119 desc : "valid with trailing newlines" ,
120120 m : "Log Checkpoint v0\n 9944\n dGhlIHZpZXcgZnJvbSB0aGUgdHJlZSB0b3BzIGlzIGdyZWF0IQ==\n \n \n \n " ,
121121 want : Checkpoint {
122- Ecosystem : "Log Checkpoint v0" ,
123- Size : 9944 ,
124- Hash : []byte ("the view from the tree tops is great!" ),
122+ Origin : "Log Checkpoint v0" ,
123+ Size : 9944 ,
124+ Hash : []byte ("the view from the tree tops is great!" ),
125125 },
126126 }, {
127127 desc : "invalid - insufficient lines" ,
@@ -184,9 +184,9 @@ func TestSigningRoundtripCheckpoint(t *testing.T) {
184184 }{
185185 {
186186 c : Checkpoint {
187- Ecosystem : "Log Checkpoint RSA v0" ,
188- Size : 123 ,
189- Hash : []byte ("bananas" ),
187+ Origin : "Log Checkpoint RSA v0" ,
188+ Size : 123 ,
189+ Hash : []byte ("bananas" ),
190190 },
191191 identity : "someone" ,
192192 signer : rsaKey ,
@@ -197,9 +197,9 @@ func TestSigningRoundtripCheckpoint(t *testing.T) {
197197 },
198198 {
199199 c : Checkpoint {
200- Ecosystem : "Log Checkpoint ECDSA v0" ,
201- Size : 123 ,
202- Hash : []byte ("bananas" ),
200+ Origin : "Log Checkpoint ECDSA v0" ,
201+ Size : 123 ,
202+ Hash : []byte ("bananas" ),
203203 },
204204 identity : "someone" ,
205205 signer : ecdsaKey ,
@@ -210,9 +210,9 @@ func TestSigningRoundtripCheckpoint(t *testing.T) {
210210 },
211211 {
212212 c : Checkpoint {
213- Ecosystem : "Log Checkpoint Ed25519 v0" ,
214- Size : 123 ,
215- Hash : []byte ("bananas" ),
213+ Origin : "Log Checkpoint Ed25519 v0" ,
214+ Size : 123 ,
215+ Hash : []byte ("bananas" ),
216216 },
217217 identity : "someone" ,
218218 signer : edPrivKey ,
@@ -223,9 +223,9 @@ func TestSigningRoundtripCheckpoint(t *testing.T) {
223223 },
224224 {
225225 c : Checkpoint {
226- Ecosystem : "Log Checkpoint Mismatch v0" ,
227- Size : 123 ,
228- Hash : []byte ("bananas" ),
226+ Origin : "Log Checkpoint Mismatch v0" ,
227+ Size : 123 ,
228+ Hash : []byte ("bananas" ),
229229 },
230230 identity : "someone" ,
231231 signer : edPrivKey ,
@@ -236,9 +236,9 @@ func TestSigningRoundtripCheckpoint(t *testing.T) {
236236 },
237237 {
238238 c : Checkpoint {
239- Ecosystem : "Log Checkpoint Mismatch v1" ,
240- Size : 123 ,
241- Hash : []byte ("bananas" ),
239+ Origin : "Log Checkpoint Mismatch v1" ,
240+ Size : 123 ,
241+ Hash : []byte ("bananas" ),
242242 },
243243 identity : "someone" ,
244244 signer : ecdsaKey ,
@@ -249,9 +249,9 @@ func TestSigningRoundtripCheckpoint(t *testing.T) {
249249 },
250250 {
251251 c : Checkpoint {
252- Ecosystem : "Log Checkpoint Mismatch v2" ,
253- Size : 123 ,
254- Hash : []byte ("bananas" ),
252+ Origin : "Log Checkpoint Mismatch v2" ,
253+ Size : 123 ,
254+ Hash : []byte ("bananas" ),
255255 },
256256 identity : "someone" ,
257257 signer : edPrivKey ,
@@ -262,9 +262,9 @@ func TestSigningRoundtripCheckpoint(t *testing.T) {
262262 },
263263 {
264264 c : Checkpoint {
265- Ecosystem : "Log Checkpoint Mismatch v3" ,
266- Size : 123 ,
267- Hash : []byte ("bananas" ),
265+ Origin : "Log Checkpoint Mismatch v3" ,
266+ Size : 123 ,
267+ Hash : []byte ("bananas" ),
268268 },
269269 identity : "someone" ,
270270 signer : ecdsaKey ,
@@ -274,7 +274,7 @@ func TestSigningRoundtripCheckpoint(t *testing.T) {
274274 wantVerifyErr : true ,
275275 },
276276 } {
277- t .Run (string (test .c .Ecosystem ), func (t * testing.T ) {
277+ t .Run (string (test .c .Origin ), func (t * testing.T ) {
278278 sth , err := CreateSignedCheckpoint (test .c )
279279 if err != nil {
280280 t .Fatalf ("error creating signed checkpoint" )
@@ -332,9 +332,9 @@ func TestInvalidSigVerification(t *testing.T) {
332332 }{
333333 {
334334 checkpoint : Checkpoint {
335- Ecosystem : "Log Checkpoint v0" ,
336- Size : 123 ,
337- Hash : []byte ("bananas" ),
335+ Origin : "Log Checkpoint v0" ,
336+ Size : 123 ,
337+ Hash : []byte ("bananas" ),
338338 },
339339 s : []note.Signature {},
340340 pubKey : ecdsaKey .Public (),
@@ -343,9 +343,9 @@ func TestInvalidSigVerification(t *testing.T) {
343343 {
344344
345345 checkpoint : Checkpoint {
346- Ecosystem : "Log Checkpoint v0 not base64" ,
347- Size : 123 ,
348- Hash : []byte ("bananas" ),
346+ Origin : "Log Checkpoint v0 not base64" ,
347+ Size : 123 ,
348+ Hash : []byte ("bananas" ),
349349 },
350350 pubKey : ecdsaKey .Public (),
351351 s : []note.Signature {
@@ -359,9 +359,9 @@ func TestInvalidSigVerification(t *testing.T) {
359359 },
360360 {
361361 checkpoint : Checkpoint {
362- Ecosystem : "Log Checkpoint v0 invalid signature" ,
363- Size : 123 ,
364- Hash : []byte ("bananas" ),
362+ Origin : "Log Checkpoint v0 invalid signature" ,
363+ Size : 123 ,
364+ Hash : []byte ("bananas" ),
365365 },
366366 pubKey : ecdsaKey .Public (),
367367 s : []note.Signature {
@@ -374,7 +374,7 @@ func TestInvalidSigVerification(t *testing.T) {
374374 expectedResult : false ,
375375 },
376376 } {
377- t .Run (string (test .checkpoint .Ecosystem ), func (t * testing.T ) {
377+ t .Run (string (test .checkpoint .Origin ), func (t * testing.T ) {
378378 text , _ := test .checkpoint .MarshalCheckpoint ()
379379 sc := SignedNote {
380380 Note : string (text ),
0 commit comments