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

Use GLib for computing SHA-1 digests #725

Merged
merged 2 commits into from Jun 1, 2021
Merged

Use GLib for computing SHA-1 digests #725

merged 2 commits into from Jun 1, 2021

Conversation

mgrabovsky
Copy link
Contributor

In d605ffe, we ported the generation of digests from a bundled library to Nettle. However, Red Hat security policies require that no package depend on Nettle directly. Since GLib provides functions to compute SHA-1 digests as well, we are migrating the code to use it as of now.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1956871

In d605ffe, we ported the generation of digests from a bundled library
to Nettle. However, Red Hat security policies require that no package
depend on Nettle directly. Since GLib provides functions to compute
SHA-1 digests as well, we are migrating the code to use it as of now.

Related: https://bugzilla.redhat.com/show_bug.cgi?id=1956871
Since f0a0a20 the `libreport_bin2hex()` and `libreport_hex2bin()`
functions are left unused anywhere in libreport or abrt. Let's get rid
of them.
@mgrabovsky mgrabovsky requested a review from mzidek-gh May 26, 2021 13:26
@mgrabovsky mgrabovsky added this to Pull Requests in Issue review via automation May 26, 2021
@mzidek-gh
Copy link
Contributor

This is a good opportunity to get rid of SHA1 from libreport. Please use G_CHECKSUM_SHA256 instead of the G_CHECKSUM_SHA1. It is OK if you add it as another commit in this PR.

@t184256
Copy link

t184256 commented May 26, 2021

Same as with satyr, glib is an even worse choice than nettle cert-wise, sorry.

@mgrabovsky
Copy link
Contributor Author

This is a good opportunity to get rid of SHA1 from libreport. Please use G_CHECKSUM_SHA256 instead of the G_CHECKSUM_SHA1. It is OK if you add it as another commit in this PR.

OK, that might be a way. Are we 100% sure it doesn't break anything, though?

@mzidek-gh
Copy link
Contributor

Sorry, forgot to respond. We are not 100% sure it will not break anything, but the chances are small. The only thing that relies on hash values is the duplicate hash calculation so we lose duplicates detection between old and new bugs, but that is something we already talked about in the past that it is not a big deal.

@mzidek-gh
Copy link
Contributor

Sorry, I am dropping the request to change the hash function for now. Let's merge and think what function is most suitable later.

@mzidek-gh
Copy link
Contributor

ACK.

@mgrabovsky mgrabovsky merged commit 6af783e into master Jun 1, 2021
Issue review automation moved this from Pull Requests to Done Jun 1, 2021
@mgrabovsky mgrabovsky deleted the drop-nettle branch June 1, 2021 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Issue review
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants