提交 cd6cd2e4 编写于 作者: R Roberto Sassu

Fix -w option in gen_digest_lists.c

上级 4540535f
...@@ -40,7 +40,7 @@ OPTIONS ...@@ -40,7 +40,7 @@ OPTIONS
-k <key>: key to sign -k <key>: key to sign
-w [<key password>]: key password or prompt -w [<key password>]: key password (- for prompt)
-A <alt root>: alternative root for SELinux labeling -A <alt root>: alternative root for SELinux labeling
......
...@@ -169,7 +169,7 @@ static void usage(char *progname) ...@@ -169,7 +169,7 @@ static void usage(char *progname)
"\t-I <algo>: IMA hash algorithm\n" "\t-I <algo>: IMA hash algorithm\n"
"\t-s: sign generated digest lists\n" "\t-s: sign generated digest lists\n"
"\t-k <key>: key to sign\n" "\t-k <key>: key to sign\n"
"\t-w [<key password>]: key password or prompt\n" "\t-w [<key password>]: key password (- for prompt)\n"
"\t-A <alt root>: alternative root for SELinux labeling\n" "\t-A <alt root>: alternative root for SELinux labeling\n"
"\t-h: display help\n"); "\t-h: display help\n");
} }
...@@ -267,7 +267,7 @@ int main(int argc, char **argv) ...@@ -267,7 +267,7 @@ int main(int argc, char **argv)
key_path = optarg; key_path = optarg;
break; break;
case 'w': case 'w':
if (optarg) if (optarg[0] != '-')
keypass_ptr = optarg; keypass_ptr = optarg;
else else
keypass_ptr = get_password(keypass, keypass_ptr = get_password(keypass,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册