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

Split the internal OpenPGP parser to a separate repository #2986

Merged
merged 2 commits into from
Mar 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ option(WITH_IMAEVM "Build with IMA support" OFF)
option(WITH_FAPOLICYD "Build with fapolicyd support" ON)
option(WITH_SEQUOIA "Build with Sequoia OpenPGP support" ON)
option(WITH_OPENSSL "Use openssl instead of libgcrypt for internal crypto" OFF)
option(WITH_INTERNAL_OPENPGP "Use internal OpenPGP parser (DEPRECATED)" OFF)
option(WITH_READLINE "Build with readline support" ON)
option(WITH_BZIP2 "Build with bzip2 support" ON)
option(WITH_ICONV "Build with iconv support" ON)
Expand Down
8 changes: 3 additions & 5 deletions INSTALL
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,9 @@ you can build (and install) packages normally. In this mode, libgcrypt
is used for crypthographic hash calculations by default, but alternatively
OpenSSL can be selected by specifying -DWITH_OPENSSL=ON.

Finally, the deprecated internal OpenPGP parser can be enabled with
-DWITH_SEQUOIA=OFF -DWITH_INTERNAL_OPENPGP=ON. It uses libgcrypt/OpenSSL,
depending on the WITH_OPENSSL option.
The internal parser is considered insecure and it's use is strongly
discouraged.
Finally, it's still possible to use rpm's own legacy OpenPGP parser,
but it is considered insecure and it's use is strongly discouraged:
https://github.com/rpm-software-management/rpmpgp_legacy

libgcrypt library is available from https://www.gnupg.org/software/libgcrypt/

Expand Down
7 changes: 5 additions & 2 deletions rpmio/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ target_include_directories(librpmio PRIVATE
${Intl_INCLUDE_DIRS}
)

if (EXISTS ${CMAKE_SOURCE_DIR}/rpmio/rpmpgp_legacy/CMakeLists.txt)
add_subdirectory(rpmpgp_legacy)
endif()

if (WITH_SEQUOIA)
pkg_check_modules(RPMSEQUOIA REQUIRED IMPORTED_TARGET rpm-sequoia>=1.4.0)
target_sources(librpmio PRIVATE rpmpgp_sequoia.c)
target_link_libraries(librpmio PRIVATE PkgConfig::RPMSEQUOIA)
else()
if (WITH_INTERNAL_OPENPGP)
add_subdirectory(rpmpgp_legacy)
if (WITH_LEGACY_OPENPGP)
target_link_libraries(librpmio PRIVATE rpmpgp_legacy)
else()
target_sources(librpmio PRIVATE rpmpgp_dummy.c)
Expand Down
15 changes: 0 additions & 15 deletions rpmio/rpmpgp_legacy/CMakeLists.txt

This file was deleted.