Update CMake

This commit is contained in:
Zhi Guan
2026-06-03 22:49:40 +08:00
parent f6a68cbb3f
commit 8b8ec6948c
7 changed files with 21 additions and 8 deletions

View File

@@ -57,7 +57,7 @@ int cmsdecrypt_main(int argc, char **argv)
return 1;
}
while (argc > 1) {
while (argc > 0) {
if (!strcmp(*argv, "-help")) {
printf("usage: %s %s\n", prog, options);
ret = 0;

View File

@@ -83,6 +83,10 @@ int cmsencrypt_main(int argc, char **argv)
fprintf(stderr, "usage: %s %s\n", prog, options);
return 1;
}
if (argc == 2 && !strcmp(argv[1], "-help")) {
printf("usage: %s %s\n", prog, options);
return 0;
}
// prepare cert buffer length?
if (get_files_size(argc, argv, "-rcptcert", &rcpt_certs_len) != 1) {

View File

@@ -37,7 +37,7 @@ int cmsparse_main(int argc, char **argv)
fprintf(stderr, "usage: %s %s\n", prog, options);
return 1;
}
while (argc > 1) {
while (argc > 0) {
if (!strcmp(*argv, "-help")) {
printf("usage: %s %s\n", prog, options);
ret = 0;

View File

@@ -51,7 +51,7 @@ int cmssign_main(int argc, char **argv)
return 1;
}
while (argc > 1) {
while (argc > 0) {
if (!strcmp(*argv, "-help")) {
printf("usage: %s %s\n", prog, options);
ret = 0;

View File

@@ -51,7 +51,7 @@ int cmsverify_main(int argc, char **argv)
return 1;
}
while (argc > 1) {
while (argc > 0) {
if (!strcmp(*argv, "-help")) {
printf("usage: %s %s\n", prog, options);
ret = 0;