All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreï V. FOMITCHEV-HERVIEU" <andrei.fomitchevhervieu@getinge.com>
To: <buildroot@buildroot.org>
Cc: "Andreï V. FOMITCHEV-HERVIEU" <andrei.fomitchevhervieu@getinge.com>
Subject: [Buildroot] [PATCH 1/1] package/opkg: enable openssl signature
Date: Wed, 13 Apr 2022 09:31:19 +0200	[thread overview]
Message-ID: <20220413073119.458265-1-andrei.fomitchevhervieu@getinge.com> (raw)

OPKG supports either GPG or OpenSSL signature check. It is already possible
to enable in buildroot the check of GPG signatures. This patch adds similar
configuration to enable the OpenSSL signature checks.

Signed-off-by: Andreï V. FOMITCHEV-HERVIEU <andrei.fomitchevhervieu@getinge.com>
Change-Id: Id2c76b3cb39ba5eed5bd0bef7648f7970033b87b
---
 package/opkg/Config.in | 12 ++++++++++++
 package/opkg/opkg.mk   |  2 ++
 2 files changed, 14 insertions(+)

diff --git a/package/opkg/Config.in b/package/opkg/Config.in
index 1f6a39343f..2e3f9fca3e 100644
--- a/package/opkg/Config.in
+++ b/package/opkg/Config.in
@@ -29,5 +29,17 @@ config BR2_PACKAGE_OPKG_GPG_SIGN
 	help
 	  Enable opkg package signature checking support using
 	  gnupg/libgpgme.
+config BR2_PACKAGE_OPKG_OPENSSL_SIGN
+	bool "openssl support"
+	select BR2_PACKAGE_OPENSSL
+	select BR2_PACKAGE_LIBOPENSSL_ENGINES
+	help
+	  Enable opkg package signature checking support using
+	  openssl. Example of openssl command to generate opkg
+	  signature
+	  openssl smime -sign -in Packages -inkey private.key
+	  -signer public.pem -binary -outform PEM --nodetach
+	   -out Packages.sig
+	  Where Packages is the file to sign 
 
 endif
diff --git a/package/opkg/opkg.mk b/package/opkg/opkg.mk
index 501edcf8af..583744ec93 100644
--- a/package/opkg/opkg.mk
+++ b/package/opkg/opkg.mk
@@ -23,6 +23,8 @@ OPKG_CONF_ENV += \
 	ac_cv_path_GPGME_CONFIG=$(STAGING_DIR)/usr/bin/gpgme-config \
 	ac_cv_path_GPGERR_CONFIG=$(STAGING_DIR)/usr/bin/gpg-error-config
 OPKG_DEPENDENCIES += libgpgme libgpg-error
+else ifeq ($(BR2_PACKAGE_OPKG_OPENSSL_SIGN),y)
+OPKG_CONF_OPTS += --disable-gpg --enable-openssl
 else
 OPKG_CONF_OPTS += --disable-gpg
 endif
-- 
2.25.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2022-04-13  7:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-13  7:31 Andreï V. FOMITCHEV-HERVIEU [this message]
2022-04-13 21:08 ` [Buildroot] [PATCH 1/1] package/opkg: enable openssl signature Thomas Petazzoni via buildroot
2022-04-14  5:53   ` [Buildroot] [EXT] " Andrei FOMITCHEV HERVIEU

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220413073119.458265-1-andrei.fomitchevhervieu@getinge.com \
    --to=andrei.fomitchevhervieu@getinge.com \
    --cc=buildroot@buildroot.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.