-
Notifications
You must be signed in to change notification settings - Fork 25
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
CSAF Downloader - Signature verification for suse.com
fails for SHA1 digest
#603
Comments
Thanks for reporting, we look into it. |
What we do at core is this: leads to (after building):
|
Mit gpg (GnuPG) 2.4.6:
Algo 2 is SHA-1 see https://www.rfc-editor.org/rfc/rfc4880#section-9.4 |
ProtonMail/gopenpgp#101 (comment) (tnx @koplas for finding this) There are at least some possible ways to act here.
|
Using of SHA1 as digest algorithm is strongly discouraged. As CSAF 2.0 is a new application, there is no need for legacy support. So this should be fixed on the suse.com's side. References:
|
suse.com
fails, but works with gpg command linesuse.com
fails for SHA1 digest
Thank you a lot for the very quick and detailed feedback. It makes sense to me as well, not to support the outdated algorithm. I reached out to SUSE and asked them if they could use a more secure algorithm for their signing. |
One question regarding this: Does the csaf_uploader reject such a key as well, so that this is consistent in the tooling and the user can't use it to upload data which can't be downloaded with the CSAF Downloader? |
I currently don't know if we check the signatures if it externally provided. But a good mode of the |
The more common use of You can upload an externally signed CSAF document as well, I currently do not know if the signature will be checked then. |
fwiw i changed gpgs default hashing alg to SHA256 for the SUSE data. |
Bug Summary
CSAF Downloader Signature verification for
suse.com
fails, but works withgpg
in the command line. This issue appeared with the latest state in main (commit 1daaed2). The error isInvalid signature caused by openpgp: invalid data: hash algorithm or salt mismatch with cleartext message headers
To reproduce
Execute in a bash (like) shell in the repo root (with
go
installed):git checkout 1daaed2c516d3fd674eb99c39dfc5f87ba43f78a # latest state on main, when issue was created go run ./cmd/csaf_downloader --log_level debug -d suse suse.com
Currently gives the error message in the log (and same for all other csaf documents, execept for one)
Only a single signature verification out of 22278 CSAF documents from
suse.com
succeeded.However when doing the verification via
gpg
in the command line, the verification succeeds:The output of the last command is:
Expected behavior
Expected signature check to succeed, but it failed.
Full log output
To give context, the full log output of the command
go run ./cmd/csaf_downloader --log_level debug -d suse suse.com
until the first error message appeared :The text was updated successfully, but these errors were encountered: