Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardas-buc committed Oct 25, 2023
2 parents 32401ca + e9ea769 commit e14d198
Show file tree
Hide file tree
Showing 14 changed files with 535 additions and 288 deletions.
25 changes: 0 additions & 25 deletions doc/archive-hashchain-verifier.README

This file was deleted.

256 changes: 0 additions & 256 deletions doc/archive-hashchain-verifier.rb

This file was deleted.

17 changes: 17 additions & 0 deletions src/addons/messagelog/messagelog-archive-verifier/README.md
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 src/addons/messagelog/messagelog-archive-verifier/build.gradle
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
Loading

0 comments on commit e14d198

Please sign in to comment.