-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
Signed-off-by: chaosinthecrd <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,7 @@ import ( | |
"github.com/in-toto/go-witness/archivista" | ||
Check failure on line 24 in cmd/run.go
|
||
"github.com/in-toto/go-witness/attestation" | ||
Check failure on line 25 in cmd/run.go
|
||
"github.com/in-toto/go-witness/attestation/commandrun" | ||
Check failure on line 26 in cmd/run.go
|
||
"github.com/in-toto/go-witness/attestation/custom" | ||
Check failure on line 27 in cmd/run.go
|
||
"github.com/in-toto/go-witness/cryptoutil" | ||
"github.com/in-toto/go-witness/log" | ||
"github.com/in-toto/go-witness/registry" | ||
Check failure on line 30 in cmd/run.go
|
||
|
@@ -108,14 +109,14 @@ func runRun(ctx context.Context, ro options.RunOptions, args []string, signers . | |
return fmt.Errorf("failed to read custom attestor file: %w", err) | ||
} | ||
|
||
var definition attestation.CustomAttestorDefinition | ||
err = json.Unmarshal(f, &definition) | ||
var custom custom.CustomAttestor | ||
err = json.Unmarshal(f, &custom.Definition) | ||
if err != nil { | ||
return fmt.Errorf("failed to unmarshal custom attestor definition: %w", err) | ||
} | ||
|
||
attestation.RegisterCustomAttestation(definition) | ||
attestor, err := attestation.GetAttestor(definition.Metadata.Type) | ||
attestation.RegisterCustomAttestation(&custom) | ||
attestor, err := attestation.GetAttestor(custom.Definition.Metadata.Type) | ||
if err != nil { | ||
return fmt.Errorf("failed to create attestor: %w", err) | ||
} | ||
|