fix: spdx java checksum correctness (#1348)

This commit is contained in:
Christopher Angelo Phillips
2022-11-18 13:42:55 -05:00
committed by GitHub
parent 9d8244bae6
commit da4b2df576
4 changed files with 238 additions and 1 deletions
@@ -296,8 +296,9 @@ func toPackageChecksums(p pkg.Package) ([]common.Checksum, bool) {
if len(meta.ArchiveDigests) > 0 {
filesAnalyzed = true
for _, digest := range meta.ArchiveDigests {
algo := strings.ToUpper(digest.Algorithm)
checksums = append(checksums, common.Checksum{
Algorithm: common.ChecksumAlgorithm(digest.Algorithm),
Algorithm: common.ChecksumAlgorithm(algo),
Value: digest.Value,
})
}