Skip to main content

eas verifying a store

To ensure, that the files are not changed, a verification can be executed on a store. The verification checks,

  • if all records listed in the registry are available in the repository
  • if all signatures of the records match the record and its attachments by
    • checking the hash values in the signature
    • checking the signature value in the record signature

For technical checks of a stores index and registry, see also the tool eas-check.

Executing the verification

The verification can be executed using the eas. In a case of a successful verification the output looks like this:

# eas -c /path/to/store.ini --verify -v
[  1] Starting verify ...
[  2] Verified 11 / 11 files (100.0 %)
[  3] Finished verify
[  3] Elapsed time 0.6 s
[  4] No invalid signatures detected

In case of a changed record, an exception will be thrown:

# eas -c /path/to/store.ini --verify -v
[  1] Starting verify ...
[  2] Verified 11 / 11 files (100.0 %)
Otris Exception Output
Type:     struct boost::wrapexcept<struct otris::store::SignatureException>
File:     D:\jenkins\workspace\EAS-Develop-Windows-Build-VC16\label\EAS-Windows-
Build-VC16\Core\src\otris\eas\store\Signatory.cpp at line 626
Function: void __cdecl otris::store::Signatory::SignatureXmlHandler::check(void)

IO:       Filename="dso:2020/12/8/14/4315b631-80c4-4b2a-b475-b56d2f4bb90f/4315b631-80c4-4b2a-b475-b56d2f4bb90f.xml"
Info:     Message="Checksum mismatch for a reference!"

Boost Diagnostic Information
D:\jenkins\workspace\EAS-Develop-Windows-Build-VC16\label\EAS-Windows-Build-VC16\Core\src\otris\eas\store\Signatory.cpp(626): Throw in function void __cdecl otris::store::Signatory::SignatureXmlHandler::check(void)
Dynamic exception type: struct boost::wrapexcept<struct otris::store::SignatureException>
std::exception::what: Unknown exception
[struct otris::tag_file_name * __ptr64] = dso:2020/12/8/14/4315b631-80c4-4b2a-b475-b56d2f4bb90f/4315b631-80c4-4b2a-b475-b56d2f4bb90f.xml
[struct otris::tag_message * __ptr64] = Checksum mismatch for a reference!

A report file can be also created. It will be written to the standard outpu as CSV file:

# eas -c /path/to/store.ini --verify-report > verify.csv

The CSV file has the following structure:

  • Full path to the signature file
  • Error message
  • Path to the invalid record in the store
"d:\tmp\worm/store1/ARCHIVE\2020/12/8/14/4315b631-80c4-4b2a-b475-b56d2f4bb90f\4315b631-80c4-4b2a-b475-b56d2f4bb90f.xmldsig";"Checksum mismatch! A refered file was changed!";"dso:2020/12/8/14/4315b631-80c4-4b2a-b475-b56d2f4bb90f/4315b631-80c4-4b2a-b475-b56d2f4bb90f.xml"