mirror of
https://github.com/containers/skopeo.git
synced 2025-09-01 14:47:10 +00:00
Merge pull request #1965 from mtrmac/verify-error
Fix error handling of signature.NewEphemeralGPGSigningMechanism
This commit is contained in:
@@ -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)
|
return fmt.Errorf("Error reading public keys from %s: %w", opts.publicKeyFile, err)
|
||||||
}
|
}
|
||||||
mech, publicKeyfingerprints, err = signature.NewEphemeralGPGSigningMechanism(publicKeys)
|
mech, publicKeyfingerprints, err = signature.NewEphemeralGPGSigningMechanism(publicKeys)
|
||||||
|
if err != nil {
|
||||||
|
return fmt.Errorf("Error initializing GPG: %w", err)
|
||||||
|
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
mech, err = signature.NewGPGSigningMechanism()
|
mech, err = signature.NewGPGSigningMechanism()
|
||||||
}
|
if err != nil {
|
||||||
if err != nil {
|
return fmt.Errorf("Error initializing GPG: %w", err)
|
||||||
return fmt.Errorf("Error initializing GPG: %w", err)
|
}
|
||||||
}
|
}
|
||||||
defer mech.Close()
|
defer mech.Close()
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user