Skip to content

Commit

Permalink
Merge pull request containers#1965 from mtrmac/verify-error
Browse files Browse the repository at this point in the history
Fix error handling of signature.NewEphemeralGPGSigningMechanism
  • Loading branch information
mtrmac authored Apr 6, 2023
2 parents 0f3e6e3 + 4be583c commit cd1c43c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions cmd/skopeo/signing.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,15 @@ func (opts *standaloneVerifyOptions) run(args []string, stdout io.Writer) error
return fmt.Errorf("Error reading public keys from %s: %w", opts.publicKeyFile, err)
}
mech, publicKeyfingerprints, err = signature.NewEphemeralGPGSigningMechanism(publicKeys)
if err != nil {
return fmt.Errorf("Error initializing GPG: %w", err)

}
} else {
mech, err = signature.NewGPGSigningMechanism()
}
if err != nil {
return fmt.Errorf("Error initializing GPG: %w", err)
if err != nil {
return fmt.Errorf("Error initializing GPG: %w", err)
}
}
defer mech.Close()

Expand Down

0 comments on commit cd1c43c

Please sign in to comment.