-
Notifications
You must be signed in to change notification settings - Fork 193
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/develop' into develop
- Loading branch information
Showing
14 changed files
with
535 additions
and
288 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
src/addons/messagelog/messagelog-archive-verifier/README.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
## Messagelog archive verifier | ||
|
||
This code verifies the correctness of the hash chain related to the log archive. It calculates the ASiC container hashes in the log archive (zip) file and compares them with the hashes in the linking info file. | ||
|
||
If there are previous archived files, the script also takes into consideration the last hash step result of the previous archive file. | ||
|
||
To use the script, make sure you have the matching Java version installed. | ||
|
||
The script can be invoked using the following command: | ||
|
||
``` | ||
java -jar messagelog-archive-verifier.jar <pathToArchiveFile.zip> <(lastHashStepResult) or (-f) or (--first)> | ||
``` | ||
|
||
**NB!** If the value of the second argument is `-f` or `--first` (both case insensitive), it is assumed that the first archive file in the chain is being verified, and no previous hash steps have been calculated. | ||
|
||
The standard output of the script is the result of the last hash step of the archive file. |
27 changes: 27 additions & 0 deletions
27
src/addons/messagelog/messagelog-archive-verifier/build.gradle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
plugins { | ||
id("java") | ||
id 'com.github.johnrengelman.shadow' | ||
} | ||
|
||
dependencies { | ||
implementation project(':common:common-util') | ||
} | ||
|
||
ext { | ||
mainClassName = 'org.niis.xroad.cli.ArchiveHashChainVerifier' | ||
} | ||
|
||
jar { | ||
manifest { | ||
attributes 'Main-Class': mainClassName | ||
} | ||
} | ||
|
||
shadowJar { | ||
archiveVersion = '' | ||
archiveClassifier = '' | ||
from rootProject.file("LICENSE.txt") | ||
} | ||
|
||
jar.enabled = false | ||
build.dependsOn shadowJar |
Oops, something went wrong.