Skip to content

Commit

Permalink
cli: fix incorrect handling of the context argument
Browse files Browse the repository at this point in the history
Before, an incorrect check caused the CLI to not pass
the correct context value to the server when decrypting
some data.

Signed-off-by: Andreas Auernhammer <aead@mail.de>
  • Loading branch information
Andreas Auernhammer authored and harshavardhana committed Apr 26, 2021
1 parent 6b23973 commit 92fa79d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/kes/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func decryptKey(args []string) {
if err != nil {
stdlog.Fatalf("Error: invalid ciphertext: %v", err)
}
if len(args) == 3 {
if cli.NArg() == 3 {
cryptoCtx, err = base64.StdEncoding.DecodeString(cli.Arg(2))
if err != nil {
stdlog.Fatalf("Error: invalid context: %v", err)
Expand Down

0 comments on commit 92fa79d

Please sign in to comment.