File tree Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Expand file tree Collapse file tree 2 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -529,10 +529,7 @@ golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBc
529
529
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1 /go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg =
530
530
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a /go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg =
531
531
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f /go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg =
532
- <<<<<<< HEAD
533
532
golang.org/x/sys v0.1.0 /go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg =
534
- =======
535
- >>>>>>> 4bb3336 (Update sigstore/sigstore with PublicKeyDetails)
536
533
golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y =
537
534
golang.org/x/sys v0.17.0 /go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA =
538
535
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 /go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo =
Original file line number Diff line number Diff line change @@ -324,12 +324,30 @@ func (v *V001Entry) CreateFromArtifactProperties(ctx context.Context, props type
324
324
}
325
325
re .JARModel .Archive .Content = (strfmt .Base64 )(artifactBytes )
326
326
327
- if err := re .validate (); err != nil {
327
+ keyObj , sigObj , err := re .fetchExternalEntities (ctx )
328
+ if err != nil {
329
+ return nil , fmt .Errorf ("error retrieving external entities: %v" , err )
330
+ }
331
+
332
+ // need to canonicalize key content
333
+ keyContent , err := keyObj .CanonicalValue ()
334
+ if err != nil {
335
+ return nil , err
336
+ }
337
+ sigContent , err := sigObj .CanonicalValue ()
338
+ if err != nil {
328
339
return nil , err
329
340
}
330
341
331
- if _ , _ , err := re .fetchExternalEntities (ctx ); err != nil {
332
- return nil , fmt .Errorf ("error retrieving external entities: %v" , err )
342
+ re .JARModel .Signature = & models.JarV001SchemaSignature {
343
+ PublicKey : & models.JarV001SchemaSignaturePublicKey {
344
+ Content : (* strfmt .Base64 )(& keyContent ),
345
+ },
346
+ Content : sigContent ,
347
+ }
348
+
349
+ if err := re .validate (); err != nil {
350
+ return nil , err
333
351
}
334
352
335
353
returnVal .APIVersion = swag .String (re .APIVersion ())
You can’t perform that action at this time.
0 commit comments