[Rpm-maint] [rpm-software-management/rpm] OpenPGP Backend based on Sequoia (Issue #1978)
nwalfield
notifications at github.com
Mon Apr 11 11:54:00 UTC 2022
Regarding `digest.h`, I wrote:
> While reviewing my MR, I realized that I [removed the pgpDigAlg definition and all of the function declarations in digest.h](https://github.com/nwalfield/rpm/commit/57704f76b9f99daf08566a0df166282e7d8595bd#diff-837a7b262efefd9e0e86fd1330ac4dbd90b69d7ea3a20826369bbb6da64eab32L6-L49). This doesn't seem to cause any test failures. Should these symbols be removed? If I understood correctly, they are internal symbols so removing them won't require an so name bump. If you agree, then I make a separate MR for that bit.
This isn't correct. The internal PGP implementation with either libgcrypt or openssl uses these definitions. Since we want to keep the internal PGP implementation, they can't be removed.
`pgpPubkeyNew`, `pgpSignatureNew`, and `pgpDigAlgFree` are only used by `rpmpgp.c`, and `pgpMpiLen` is used by `digest_libgcrypt.c` and `digest_openssl.c`. `pgpDigAlg_s` is used by `rpmpgp.c`, `digest_libgcrypt.c`, and `digest_openssl.c`. So, these symbols appear to be private to the PGP backend.
`pgpPubkeyNew`, `pgpSignatureNew` are backend specific and are defined in both `digest_libgcrypt.c` and `digest_openssl.c`. `pgpDigAlgFree` is common to both backends and is defined is `rpmpgp.c`. `pgpMpiLen` and `pgpDigAlg_s` are common to both backends and are defined in `digest.h`.
The Sequoia backend doesn't need the `pgpDigAlg_s` struct or these four functions.
[I've moved](https://github.com/nwalfield/rpm/commit/5ff061c04a7b0ae55f88bddd93494d3f89ab724e) these declarations into `digest_libgcrypt.h` and `digest_openssl.h` and changed `digest.h` to use the right header based on the selected backend. (`digest_openssl.h` currently just `#include`s `digest_libgcrypt.h` to avoid duplicating code).
I also split `rpmpgp.c` into `rpmpgp.h` and `rpmpgp_internal.c`. `rpmpgp.c` now just contains the code that is common to all three variants. This patch does not depend on the Sequoia backend.
--
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1978#issuecomment-1094958104
You are receiving this because you are subscribed to this thread.
Message ID: <rpm-software-management/rpm/issues/1978/1094958104 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20220411/dbef8dec/attachment.html>
More information about the Rpm-maint
mailing list