Fossil SCM
Fix the "fossil sha3sum" command so that it accepts "-" to mean stdin. Clarify the algorithm used.
Commit
86fa03adb1119b7eb187c57ba30e54c6bf3a52f2223cb095578882d34245b407
Parent
6419592d659a219…
2 files changed
+1
-1
+3
+1
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -889,11 +889,11 @@ | ||
| 889 | 889 | ** an error message and quit. |
| 890 | 890 | */ |
| 891 | 891 | void verify_all_options(void){ |
| 892 | 892 | int i; |
| 893 | 893 | for(i=1; i<g.argc; i++){ |
| 894 | - if( g.argv[i][0]=='-' ){ | |
| 894 | + if( g.argv[i][0]=='-' && g.argv[i][1]!=0 ){ | |
| 895 | 895 | fossil_fatal( |
| 896 | 896 | "unrecognized command-line option, or missing argument: %s", |
| 897 | 897 | g.argv[i]); |
| 898 | 898 | } |
| 899 | 899 | } |
| 900 | 900 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -889,11 +889,11 @@ | |
| 889 | ** an error message and quit. |
| 890 | */ |
| 891 | void verify_all_options(void){ |
| 892 | int i; |
| 893 | for(i=1; i<g.argc; i++){ |
| 894 | if( g.argv[i][0]=='-' ){ |
| 895 | fossil_fatal( |
| 896 | "unrecognized command-line option, or missing argument: %s", |
| 897 | g.argv[i]); |
| 898 | } |
| 899 | } |
| 900 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -889,11 +889,11 @@ | |
| 889 | ** an error message and quit. |
| 890 | */ |
| 891 | void verify_all_options(void){ |
| 892 | int i; |
| 893 | for(i=1; i<g.argc; i++){ |
| 894 | if( g.argv[i][0]=='-' && g.argv[i][1]!=0 ){ |
| 895 | fossil_fatal( |
| 896 | "unrecognized command-line option, or missing argument: %s", |
| 897 | g.argv[i]); |
| 898 | } |
| 899 | } |
| 900 |
+3
| --- src/sha3.c | ||
| +++ src/sha3.c | ||
| @@ -624,10 +624,13 @@ | ||
| 624 | 624 | ** Usage: %fossil sha3sum FILE... |
| 625 | 625 | ** |
| 626 | 626 | ** Compute an SHA3 checksum of all files named on the command-line. |
| 627 | 627 | ** If a file is named "-" then take its content from standard input. |
| 628 | 628 | ** |
| 629 | +** To be clear: The official NIST FIPS-202 implementation of SHA3 | |
| 630 | +** with the added 01 padding is used, not the original Keccak submission. | |
| 631 | +** | |
| 629 | 632 | ** Options: |
| 630 | 633 | ** |
| 631 | 634 | ** --224 Compute a SHA3-224 hash |
| 632 | 635 | ** --256 Compute a SHA3-256 hash (the default) |
| 633 | 636 | ** --384 Compute a SHA3-384 hash |
| 634 | 637 |
| --- src/sha3.c | |
| +++ src/sha3.c | |
| @@ -624,10 +624,13 @@ | |
| 624 | ** Usage: %fossil sha3sum FILE... |
| 625 | ** |
| 626 | ** Compute an SHA3 checksum of all files named on the command-line. |
| 627 | ** If a file is named "-" then take its content from standard input. |
| 628 | ** |
| 629 | ** Options: |
| 630 | ** |
| 631 | ** --224 Compute a SHA3-224 hash |
| 632 | ** --256 Compute a SHA3-256 hash (the default) |
| 633 | ** --384 Compute a SHA3-384 hash |
| 634 |
| --- src/sha3.c | |
| +++ src/sha3.c | |
| @@ -624,10 +624,13 @@ | |
| 624 | ** Usage: %fossil sha3sum FILE... |
| 625 | ** |
| 626 | ** Compute an SHA3 checksum of all files named on the command-line. |
| 627 | ** If a file is named "-" then take its content from standard input. |
| 628 | ** |
| 629 | ** To be clear: The official NIST FIPS-202 implementation of SHA3 |
| 630 | ** with the added 01 padding is used, not the original Keccak submission. |
| 631 | ** |
| 632 | ** Options: |
| 633 | ** |
| 634 | ** --224 Compute a SHA3-224 hash |
| 635 | ** --256 Compute a SHA3-256 hash (the default) |
| 636 | ** --384 Compute a SHA3-384 hash |
| 637 |