1
0
Fork 0
mirror of https://github.com/gocsaf/csaf.git synced 2025-12-22 05:40:11 +01:00

Remote validator output (#347)

* The validator is now able to print the details of the remote validations.
---------

Co-authored-by: JanHoefelmeyer <hoefelmeyer.jan@gmail.com>
Co-authored-by: JanHoefelmeyer <Jan Höfelmeyer jhoefelmeyer@intevation.de>
Co-authored-by: Sascha L. Teichmann <sascha.teichmann@intevation.de>
This commit is contained in:
JanHoefelmeyer 2023-03-15 11:02:06 +01:00 committed by GitHub
parent 92433c1272
commit 8f87273837
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 289 additions and 70 deletions

View file

@ -370,13 +370,13 @@ func (d *downloader) downloadFiles(label csaf.TLPLabel, files []csaf.AdvisoryFil
// Validate against remote validator
if d.validator != nil {
ok, err := d.validator.Validate(doc)
rvr, err := d.validator.Validate(doc)
if err != nil {
return fmt.Errorf(
"calling remote validator on %q failed: %w",
file.URL(), err)
}
if !ok {
if !rvr.Valid {
log.Printf("Remote validation of %q failed\n", file.URL())
}
}