aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2019-06-13 18:46:39 +0300
committerDavid Howells <dhowells@redhat.com>2019-06-19 13:42:05 +0100
commit7afeb339062d42e5bae49e68c870971a2672333f (patch)
treeecae388c02b22bf55caacd6b61b1eee649f3bc3e
parent7f4d9434de9a3d47a9e5259a31279a90c1b21451 (diff)
downloadkeyutils-7afeb339062d42e5bae49e68c870971a2672333f.tar.gz
Make key=value argument list optional for pkey_{encrypt,decrypt,sign}
keyctl's help message suggests that including a key=value style list of arguments is optional for the pkey_* operations, and for pkey_query and pkey_verify it indeed seems to be optional, but the other three operations require that at least one key=value pair be passed in. This patch changes the logic to make key=value lists optional for all pkey_* operations. Signed-off-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: David Howells <dhowells@redhat.com>
-rw-r--r--keyctl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/keyctl.c b/keyctl.c
index c06777f..8c0b57f 100644
--- a/keyctl.c
+++ b/keyctl.c
@@ -1931,7 +1931,7 @@ static void act_keyctl_pkey_encrypt(int argc, char *argv[])
void *in, *out;
char info[4096];
- if (argc < 5)
+ if (argc < 4)
format();
pkey_parse_info(argv + 4, info);
@@ -1971,7 +1971,7 @@ static void act_keyctl_pkey_decrypt(int argc, char *argv[])
void *in, *out;
char info[4096];
- if (argc < 5)
+ if (argc < 4)
format();
pkey_parse_info(argv + 4, info);
@@ -2011,7 +2011,7 @@ static void act_keyctl_pkey_sign(int argc, char *argv[])
void *in, *out;
char info[4096];
- if (argc < 5)
+ if (argc < 4)
format();
pkey_parse_info(argv + 4, info);