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

Compare commits

...

2 commits

Author SHA1 Message Date
koplas
9275a37a9f Format 2025-01-08 08:50:30 +01:00
koplas
b8a5fa72d5 Fix nil check in downloader 2025-01-08 08:49:42 +01:00

View file

@ -133,7 +133,7 @@ func (d *downloader) httpClient() util.Client {
client := util.Client(&hClient) client := util.Client(&hClient)
// Overwrite for testing purposes // Overwrite for testing purposes
if client != nil { if d.client != nil {
client = *d.client client = *d.client
} }
@ -514,7 +514,8 @@ nextAdvisory:
url: file.SHA512URL(), url: file.SHA512URL(),
warn: true, warn: true,
hashType: algSha512, hashType: algSha512,
preferred: strings.EqualFold(string(d.cfg.PreferredHash), string(algSha512))}) preferred: strings.EqualFold(string(d.cfg.PreferredHash), string(algSha512)),
})
} else { } else {
slog.Info("SHA512 not present") slog.Info("SHA512 not present")
} }
@ -523,7 +524,8 @@ nextAdvisory:
url: file.SHA256URL(), url: file.SHA256URL(),
warn: true, warn: true,
hashType: algSha256, hashType: algSha256,
preferred: strings.EqualFold(string(d.cfg.PreferredHash), string(algSha256))}) preferred: strings.EqualFold(string(d.cfg.PreferredHash), string(algSha256)),
})
} else { } else {
slog.Info("SHA256 not present") slog.Info("SHA256 not present")
} }