Skip to content

Commit

Permalink
Move the internal OpenPGP implementation to its own file.
Browse files Browse the repository at this point in the history
Split the internal OpenPGP implementation into the bits that are
needed by a new OpenPGP backend like Sequoia, and the bits that are
not needed by another OpenPGP backend.

Move most of the functionality in rpmio/rpmpgp.c into
rpmio/rpmpgp_internal.c.

Leave pgpValStr, and pgpIdentItem, which are used for printing and
needn't be reimplemented by other backends, and pgpReadPkts, which is
just a thin wrapper around pgpParsePkts, and which uses an internal
rpm function that a new backend shouldn't have to worry about
emulating or even calling.

Move the symbol tables, which are used by pgpValStr, pgpIdentItem, and
the internal OpenPGP implementation to rpmio/rpmpgp.h.  These are
common to all implementations.

Fixes #2000.
  • Loading branch information
nwalfield authored and pmatilai committed Apr 12, 2022
1 parent eaf359f commit d8bb57e
Show file tree
Hide file tree
Showing 4 changed files with 1,522 additions and 1,503 deletions.
4 changes: 2 additions & 2 deletions rpmio/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ usrlib_LTLIBRARIES = librpmio.la
librpmio_la_SOURCES = \
argv.c base64.c digest.h digest.c expression.c macro.c \
rpmhook.c rpmio.c rpmlog.c rpmmalloc.c rgetopt.c \
rpmpgp.c rpmsq.c rpmsw.c url.c \
rpmpgp.c rpmpgp.h rpmsq.c rpmsw.c url.c \
rpmio_internal.h rpmhook.h rpmvercmp.c rpmver.c \
rpmstring.c rpmfileutil.c rpmglob.c \
rpmkeyring.c rpmstrpool.c rpmmacro_internal.h \
rpmlua.c rpmlua.h lposix.c lposix.h
rpmlua.c rpmlua.h lposix.c lposix.h rpmpgp_internal.c

if WITH_OPENSSL
librpmio_la_SOURCES += digest_openssl.c
Expand Down
Loading

0 comments on commit d8bb57e

Please sign in to comment.