* [Buildroot] [PATCH v2 1/2] package/oath-toolkit: new package
@ 2024-10-05 22:58 Julien Olivain
2024-10-05 22:58 ` [Buildroot] [PATCH v2 2/2] support/testing: add oath-toolkit runtime test Julien Olivain
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Julien Olivain @ 2024-10-05 22:58 UTC (permalink / raw)
To: buildroot; +Cc: Julien Olivain, Gilles Talis, Thomas Petazzoni
OATH Toolkit provide components to build one-time password
authentication systems. It contains shared C libraries,
command line tools and a PAM module. Supported technologies
include the event-based HOTP algorithm (RFC 4226), the
time-based TOTP algorithm (RFC 6238), and Portable Symmetric
Key Container (PSKC, RFC 6030) to manage secret key
data. OATH stands for Open AuTHentication, which is the
organization that specify the algorithms.
https://www.nongnu.org/oath-toolkit/
Signed-off-by: Julien Olivain <ju.o@free.fr>
---
Changes v1 -> v2:
- Included all changes recommended by Gilles:
- bump to 2.6.12 to include recent security fix
- add _INSTALL_STAGING = YES
- Fix PSKC typo
Patch tested in:
https://gitlab.com/jolivain/buildroot/-/jobs/8002912026
---
DEVELOPERS | 1 +
package/Config.in | 1 +
package/oath-toolkit/Config.in | 27 +++++++++++++++++++
package/oath-toolkit/oath-toolkit.hash | 12 +++++++++
package/oath-toolkit/oath-toolkit.mk | 37 ++++++++++++++++++++++++++
5 files changed, 78 insertions(+)
create mode 100644 package/oath-toolkit/Config.in
create mode 100644 package/oath-toolkit/oath-toolkit.hash
create mode 100644 package/oath-toolkit/oath-toolkit.mk
diff --git a/DEVELOPERS b/DEVELOPERS
index 44b1947487..8c20c329ea 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1814,6 +1814,7 @@ F: package/kexec/
F: package/libjxl/
F: package/libopenmpt/
F: package/mokutil/
+F: package/oath-toolkit/
F: package/octave/
F: package/ola/
F: package/openblas/
diff --git a/package/Config.in b/package/Config.in
index e1ceb81dc0..ca5508fbfa 100644
--- a/package/Config.in
+++ b/package/Config.in
@@ -1611,6 +1611,7 @@ menu "Crypto"
source "package/libxcrypt/Config.in"
source "package/mbedtls/Config.in"
source "package/nettle/Config.in"
+ source "package/oath-toolkit/Config.in"
source "package/openssl/Config.in"
source "package/parsec-tool/Config.in"
source "package/pkcs11-helper/Config.in"
diff --git a/package/oath-toolkit/Config.in b/package/oath-toolkit/Config.in
new file mode 100644
index 0000000000..f2d697a7c9
--- /dev/null
+++ b/package/oath-toolkit/Config.in
@@ -0,0 +1,27 @@
+config BR2_PACKAGE_OATH_TOOLKIT
+ bool "oath-toolkit"
+ depends on BR2_USE_WCHAR
+ help
+ OATH Toolkit provide components to build one-time password
+ authentication systems. It contains shared C libraries,
+ command line tools and a PAM module. Supported technologies
+ include the event-based HOTP algorithm (RFC 4226), the
+ time-based TOTP algorithm (RFC 6238), and Portable Symmetric
+ Key Container (PSKC, RFC 6030) to manage secret key
+ data. OATH stands for Open AuTHentication, which is the
+ organization that specify the algorithms.
+
+ https://www.nongnu.org/oath-toolkit/
+
+if BR2_PACKAGE_OATH_TOOLKIT
+
+config BR2_PACKAGE_OATH_TOOLKIT_PSKC
+ bool "enable PSKC"
+ select BR2_PACKAGE_LIBXML2
+ help
+ Enable the Portable Symmetric Key Container (PSKC) support.
+
+endif
+
+comment "oath-toolkit needs a toolchain w/ wchar"
+ depends on !BR2_USE_WCHAR
diff --git a/package/oath-toolkit/oath-toolkit.hash b/package/oath-toolkit/oath-toolkit.hash
new file mode 100644
index 0000000000..a89dd6bb94
--- /dev/null
+++ b/package/oath-toolkit/oath-toolkit.hash
@@ -0,0 +1,12 @@
+# After checking pgp signature from:
+# https://download.savannah.nongnu.org/releases/oath-toolkit/oath-toolkit-2.6.12.tar.gz.sig
+# using key A3CC9C870B9D310ABAD4CF2F51722B08FE4745A2
+# From release announce:
+# https://mail.gnu.org/archive/html/oath-toolkit-help/2024-10/msg00002.html
+sha1 0bfb6ad29d59628487c9e180c7a43f4ca301e4d1 oath-toolkit-2.6.12.tar.gz
+sha256 cafdf739b1ec4b276441c6aedae6411434bbd870071f66154b909cc6e2d9e8ba oath-toolkit-2.6.12.tar.gz
+# Locally calculated
+sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING
+sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 liboath/COPYING
+sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 oathtool/COPYING
+sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 pam_oath/COPYING
diff --git a/package/oath-toolkit/oath-toolkit.mk b/package/oath-toolkit/oath-toolkit.mk
new file mode 100644
index 0000000000..b36cd47053
--- /dev/null
+++ b/package/oath-toolkit/oath-toolkit.mk
@@ -0,0 +1,37 @@
+################################################################################
+#
+# oath-toolkit
+#
+################################################################################
+
+OATH_TOOLKIT_VERSION = 2.6.12
+OATH_TOOLKIT_SITE = https://download.savannah.nongnu.org/releases/oath-toolkit
+OATH_TOOLKIT_LICENSE = GPL-3.0+ (tools), LGPL-2.1+ (libraries)
+OATH_TOOLKIT_LICENSE_FILES = \
+ COPYING \
+ liboath/COPYING \
+ oathtool/COPYING \
+ pam_oath/COPYING
+OATH_TOOLKIT_CPE_ID_VENDOR = nongnu
+OATH_TOOLKIT_CPE_ID_PRODUCT = oath_toolkit
+OATH_TOOLKIT_INSTALL_STAGING = YES
+
+ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
+# Set the pam directory defined in linux-pam (see --enable-securedir
+# in LINUX_PAM_CONF_OPTS in package/linux-pam/linux-pam.mk).
+OATH_TOOLKIT_CONF_OPTS += \
+ --enable-pam \
+ --with-pam-dir=/lib/security
+OATH_TOOLKIT_DEPENDENCIES += linux-pam
+else
+OATH_TOOLKIT_CONF_OPTS += --disable-pam
+endif
+
+ifeq ($(BR2_PACKAGE_OATH_TOOLKIT_PSKC),y)
+OATH_TOOLKIT_CONF_OPTS += --enable-pskc
+OATH_TOOLKIT_DEPENDENCIES += libxml2
+else
+OATH_TOOLKIT_CONF_OPTS += --disable-pskc
+endif
+
+$(eval $(autotools-package))
--
2.46.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Buildroot] [PATCH v2 2/2] support/testing: add oath-toolkit runtime test
2024-10-05 22:58 [Buildroot] [PATCH v2 1/2] package/oath-toolkit: new package Julien Olivain
@ 2024-10-05 22:58 ` Julien Olivain
2024-10-07 22:37 ` [Buildroot] [PATCH v2 1/2] package/oath-toolkit: new package Gilles Talis
2024-10-26 11:55 ` Thomas Petazzoni via buildroot
2 siblings, 0 replies; 4+ messages in thread
From: Julien Olivain @ 2024-10-05 22:58 UTC (permalink / raw)
To: buildroot; +Cc: Julien Olivain, Gilles Talis, Thomas Petazzoni
Signed-off-by: Julien Olivain <ju.o@free.fr>
---
DEVELOPERS | 1 +
.../tests/package/test_oath_toolkit.py | 38 +++++++++++++++++++
2 files changed, 39 insertions(+)
create mode 100644 support/testing/tests/package/test_oath_toolkit.py
diff --git a/DEVELOPERS b/DEVELOPERS
index 8c20c329ea..ac19704923 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -1959,6 +1959,7 @@ F: support/testing/tests/package/test_ntp.py
F: support/testing/tests/package/test_ntp/
F: support/testing/tests/package/test_numactl.py
F: support/testing/tests/package/test_numactl/
+F: support/testing/tests/package/test_oath_toolkit.py
F: support/testing/tests/package/test_octave.py
F: support/testing/tests/package/test_ola.py
F: support/testing/tests/package/test_ola/
diff --git a/support/testing/tests/package/test_oath_toolkit.py b/support/testing/tests/package/test_oath_toolkit.py
new file mode 100644
index 0000000000..92c0845614
--- /dev/null
+++ b/support/testing/tests/package/test_oath_toolkit.py
@@ -0,0 +1,38 @@
+import os
+
+import infra.basetest
+
+
+class TestOathToolKit(infra.basetest.BRTest):
+ config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \
+ """
+ BR2_PACKAGE_OATH_TOOLKIT=y
+ BR2_TARGET_ROOTFS_CPIO=y
+ # BR2_TARGET_ROOTFS_TAR is not set
+ """
+
+ def test_run(self):
+ cpio_file = os.path.join(self.builddir, "images", "rootfs.cpio")
+ self.emulator.boot(arch="armv5",
+ kernel="builtin",
+ options=["-initrd", cpio_file])
+ self.emulator.login()
+
+ self.assertRunOk("oathtool --version")
+
+ # Test commands and expected results are coming from examples
+ # producing stable/reproducible outputs given in the oathtool
+ # manual page. See:
+ # https://www.nongnu.org/oath-toolkit/oathtool.1.html
+
+ tests = [
+ ("echo 00 | oathtool -", "328482"),
+ ("oathtool -c 5 3132333435363738393031323334353637383930", "254676"),
+ ("oathtool -w 10 3132333435363738393031323334353637383930 969429", "3"),
+ ("oathtool --totp --now \"2008-04-23 17:42:17 UTC\" 00", "974945")
+ ]
+
+ for cmd, expected_out in tests:
+ out, ret = self.emulator.run(cmd)
+ self.assertEqual(ret, 0, f"Failed to run '{cmd}'")
+ self.assertEqual(expected_out, out[0])
--
2.46.2
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH v2 1/2] package/oath-toolkit: new package
2024-10-05 22:58 [Buildroot] [PATCH v2 1/2] package/oath-toolkit: new package Julien Olivain
2024-10-05 22:58 ` [Buildroot] [PATCH v2 2/2] support/testing: add oath-toolkit runtime test Julien Olivain
@ 2024-10-07 22:37 ` Gilles Talis
2024-10-26 11:55 ` Thomas Petazzoni via buildroot
2 siblings, 0 replies; 4+ messages in thread
From: Gilles Talis @ 2024-10-07 22:37 UTC (permalink / raw)
To: Julien Olivain; +Cc: Thomas Petazzoni, buildroot
Hi Julien, all,
Le sam. 5 oct. 2024 à 18:58, Julien Olivain <ju.o@free.fr> a écrit :
>
> OATH Toolkit provide components to build one-time password
> authentication systems. It contains shared C libraries,
> command line tools and a PAM module. Supported technologies
> include the event-based HOTP algorithm (RFC 4226), the
> time-based TOTP algorithm (RFC 6238), and Portable Symmetric
> Key Container (PSKC, RFC 6030) to manage secret key
> data. OATH stands for Open AuTHentication, which is the
> organization that specify the algorithms.
>
> https://www.nongnu.org/oath-toolkit/
>
> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
> Changes v1 -> v2:
> - Included all changes recommended by Gilles:
> - bump to 2.6.12 to include recent security fix
> - add _INSTALL_STAGING = YES
> - Fix PSKC typo
>
> Patch tested in:
> https://gitlab.com/jolivain/buildroot/-/jobs/8002912026
> ---
> DEVELOPERS | 1 +
> package/Config.in | 1 +
> package/oath-toolkit/Config.in | 27 +++++++++++++++++++
> package/oath-toolkit/oath-toolkit.hash | 12 +++++++++
> package/oath-toolkit/oath-toolkit.mk | 37 ++++++++++++++++++++++++++
> 5 files changed, 78 insertions(+)
> create mode 100644 package/oath-toolkit/Config.in
> create mode 100644 package/oath-toolkit/oath-toolkit.hash
> create mode 100644 package/oath-toolkit/oath-toolkit.mk
>
> diff --git a/DEVELOPERS b/DEVELOPERS
> index 44b1947487..8c20c329ea 100644
> --- a/DEVELOPERS
> +++ b/DEVELOPERS
> @@ -1814,6 +1814,7 @@ F: package/kexec/
> F: package/libjxl/
> F: package/libopenmpt/
> F: package/mokutil/
> +F: package/oath-toolkit/
> F: package/octave/
> F: package/ola/
> F: package/openblas/
> diff --git a/package/Config.in b/package/Config.in
> index e1ceb81dc0..ca5508fbfa 100644
> --- a/package/Config.in
> +++ b/package/Config.in
> @@ -1611,6 +1611,7 @@ menu "Crypto"
> source "package/libxcrypt/Config.in"
> source "package/mbedtls/Config.in"
> source "package/nettle/Config.in"
> + source "package/oath-toolkit/Config.in"
> source "package/openssl/Config.in"
> source "package/parsec-tool/Config.in"
> source "package/pkcs11-helper/Config.in"
> diff --git a/package/oath-toolkit/Config.in b/package/oath-toolkit/Config.in
> new file mode 100644
> index 0000000000..f2d697a7c9
> --- /dev/null
> +++ b/package/oath-toolkit/Config.in
> @@ -0,0 +1,27 @@
> +config BR2_PACKAGE_OATH_TOOLKIT
> + bool "oath-toolkit"
> + depends on BR2_USE_WCHAR
> + help
> + OATH Toolkit provide components to build one-time password
> + authentication systems. It contains shared C libraries,
> + command line tools and a PAM module. Supported technologies
> + include the event-based HOTP algorithm (RFC 4226), the
> + time-based TOTP algorithm (RFC 6238), and Portable Symmetric
> + Key Container (PSKC, RFC 6030) to manage secret key
> + data. OATH stands for Open AuTHentication, which is the
> + organization that specify the algorithms.
> +
> + https://www.nongnu.org/oath-toolkit/
> +
> +if BR2_PACKAGE_OATH_TOOLKIT
> +
> +config BR2_PACKAGE_OATH_TOOLKIT_PSKC
> + bool "enable PSKC"
> + select BR2_PACKAGE_LIBXML2
> + help
> + Enable the Portable Symmetric Key Container (PSKC) support.
> +
> +endif
> +
> +comment "oath-toolkit needs a toolchain w/ wchar"
> + depends on !BR2_USE_WCHAR
> diff --git a/package/oath-toolkit/oath-toolkit.hash b/package/oath-toolkit/oath-toolkit.hash
> new file mode 100644
> index 0000000000..a89dd6bb94
> --- /dev/null
> +++ b/package/oath-toolkit/oath-toolkit.hash
> @@ -0,0 +1,12 @@
> +# After checking pgp signature from:
> +# https://download.savannah.nongnu.org/releases/oath-toolkit/oath-toolkit-2.6.12.tar.gz.sig
> +# using key A3CC9C870B9D310ABAD4CF2F51722B08FE4745A2
> +# From release announce:
> +# https://mail.gnu.org/archive/html/oath-toolkit-help/2024-10/msg00002.html
> +sha1 0bfb6ad29d59628487c9e180c7a43f4ca301e4d1 oath-toolkit-2.6.12.tar.gz
> +sha256 cafdf739b1ec4b276441c6aedae6411434bbd870071f66154b909cc6e2d9e8ba oath-toolkit-2.6.12.tar.gz
> +# Locally calculated
> +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 COPYING
> +sha256 dc626520dcd53a22f727af3ee42c770e56c97a64fe3adb063799d8ab032fe551 liboath/COPYING
> +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 oathtool/COPYING
> +sha256 8ceb4b9ee5adedde47b31e975c1d90c73ad27b6b165a1dcd80c7c545eb65b903 pam_oath/COPYING
> diff --git a/package/oath-toolkit/oath-toolkit.mk b/package/oath-toolkit/oath-toolkit.mk
> new file mode 100644
> index 0000000000..b36cd47053
> --- /dev/null
> +++ b/package/oath-toolkit/oath-toolkit.mk
> @@ -0,0 +1,37 @@
> +################################################################################
> +#
> +# oath-toolkit
> +#
> +################################################################################
> +
> +OATH_TOOLKIT_VERSION = 2.6.12
> +OATH_TOOLKIT_SITE = https://download.savannah.nongnu.org/releases/oath-toolkit
> +OATH_TOOLKIT_LICENSE = GPL-3.0+ (tools), LGPL-2.1+ (libraries)
> +OATH_TOOLKIT_LICENSE_FILES = \
> + COPYING \
> + liboath/COPYING \
> + oathtool/COPYING \
> + pam_oath/COPYING
> +OATH_TOOLKIT_CPE_ID_VENDOR = nongnu
> +OATH_TOOLKIT_CPE_ID_PRODUCT = oath_toolkit
> +OATH_TOOLKIT_INSTALL_STAGING = YES
> +
> +ifeq ($(BR2_PACKAGE_LINUX_PAM),y)
> +# Set the pam directory defined in linux-pam (see --enable-securedir
> +# in LINUX_PAM_CONF_OPTS in package/linux-pam/linux-pam.mk).
> +OATH_TOOLKIT_CONF_OPTS += \
> + --enable-pam \
> + --with-pam-dir=/lib/security
> +OATH_TOOLKIT_DEPENDENCIES += linux-pam
> +else
> +OATH_TOOLKIT_CONF_OPTS += --disable-pam
> +endif
> +
> +ifeq ($(BR2_PACKAGE_OATH_TOOLKIT_PSKC),y)
> +OATH_TOOLKIT_CONF_OPTS += --enable-pskc
> +OATH_TOOLKIT_DEPENDENCIES += libxml2
> +else
> +OATH_TOOLKIT_CONF_OPTS += --disable-pskc
> +endif
> +
> +$(eval $(autotools-package))
> --
> 2.46.2
>
Reviewed-by: Gilles Talis <gilles.talis@gmail.com>
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Buildroot] [PATCH v2 1/2] package/oath-toolkit: new package
2024-10-05 22:58 [Buildroot] [PATCH v2 1/2] package/oath-toolkit: new package Julien Olivain
2024-10-05 22:58 ` [Buildroot] [PATCH v2 2/2] support/testing: add oath-toolkit runtime test Julien Olivain
2024-10-07 22:37 ` [Buildroot] [PATCH v2 1/2] package/oath-toolkit: new package Gilles Talis
@ 2024-10-26 11:55 ` Thomas Petazzoni via buildroot
2 siblings, 0 replies; 4+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-10-26 11:55 UTC (permalink / raw)
To: Julien Olivain; +Cc: buildroot, Gilles Talis
On Sun, 6 Oct 2024 00:58:07 +0200
Julien Olivain <ju.o@free.fr> wrote:
> OATH Toolkit provide components to build one-time password
> authentication systems. It contains shared C libraries,
> command line tools and a PAM module. Supported technologies
> include the event-based HOTP algorithm (RFC 4226), the
> time-based TOTP algorithm (RFC 6238), and Portable Symmetric
> Key Container (PSKC, RFC 6030) to manage secret key
> data. OATH stands for Open AuTHentication, which is the
> organization that specify the algorithms.
>
> https://www.nongnu.org/oath-toolkit/
>
> Signed-off-by: Julien Olivain <ju.o@free.fr>
> ---
> Changes v1 -> v2:
> - Included all changes recommended by Gilles:
> - bump to 2.6.12 to include recent security fix
> - add _INSTALL_STAGING = YES
> - Fix PSKC typo
Series applied, thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-10-26 11:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-05 22:58 [Buildroot] [PATCH v2 1/2] package/oath-toolkit: new package Julien Olivain
2024-10-05 22:58 ` [Buildroot] [PATCH v2 2/2] support/testing: add oath-toolkit runtime test Julien Olivain
2024-10-07 22:37 ` [Buildroot] [PATCH v2 1/2] package/oath-toolkit: new package Gilles Talis
2024-10-26 11:55 ` Thomas Petazzoni via buildroot
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.