diff --git a/cmd/okms/keys/sign.go b/cmd/okms/keys/sign.go index 243226b..398169a 100644 --- a/cmd/okms/keys/sign.go +++ b/cmd/okms/keys/sign.go @@ -84,6 +84,9 @@ SIGNATURE can also be passed from a file or stdin using '-' or '@'. Stdin can ho valid := exit.OnErr2(common.Client().Verify(cmd.Context(), keyId, params.signatureAlgorithm.Alg(), true, data, signature)) if cmd.Flag("output").Value.String() == string(flagsmgmt.JSON_OUTPUT_FORMAT) { output.JsonPrint(valid) + if !valid { + exit.OnErr(errors.New("Signature invalid")) + } } else { if valid { fmt.Println("Signature is valid")