Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expand algorithm support to all valid ones #173

Merged
merged 9 commits into from
Dec 29, 2022
Merged

Expand algorithm support to all valid ones #173

merged 9 commits into from
Dec 29, 2022

Conversation

puerco
Copy link
Contributor

@puerco puerco commented Dec 1, 2022

This PR updates the 2.2 and 2.3 parsers to support files and packages checksummed with all valid algorithms.

This PR updates the packages parsers, file parsers, and all test cases to support all valid 2.2 and 2.3 hashing algorithms:

SPDX 2.2 SPDX 2.3
SHA1 SHA1
SHA224 SHA224
SHA256 SHA256
SHA384 SHA384
SHA512 SHA512
MD2 MD2
MD4 MD4
MD5 MD5
MD6 MD6
SHA3_256
SHA3_384
SHA3_512
BLAKE2b_256
BLAKE2b_384
BLAKE2b_512
BLAKE3
ADLER32

/cc @lumjjb

Signed-off-by: Adolfo García Veytia (Puerco) puerco@chainguard.dev

Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
lumjjb
lumjjb previously approved these changes Dec 2, 2022
Copy link
Collaborator

@lumjjb lumjjb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @puerco ! just a small request to add a test case for one of the newer hashes and can merge it!

tvloader/parser2v3/parse_file_test.go Show resolved Hide resolved
tvloader/parser2v3/parse_package_test.go Show resolved Hide resolved
Signed-off-by: Adolfo García Veytia (Puerco) <puerco@chainguard.dev>
@puerco
Copy link
Contributor Author

puerco commented Dec 6, 2022

@lumjjb I've added a blake3 hash to both the file and package 2.3 tvparsers.

Copy link
Collaborator

@lumjjb lumjjb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! Thanks @puerco

@puerco
Copy link
Contributor Author

puerco commented Dec 24, 2022

@lumjjb is there something missing to merge this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants