[arch-commits] Commit in yubico-c-client/repos/community-x86_64 (3 files)

Christian Hesse eworm at archlinux.org
Wed Apr 15 21:24:19 UTC 2020


    Date: Wednesday, April 15, 2020 @ 21:24:19
  Author: eworm
Revision: 615063

archrelease: copy trunk to community-x86_64

Added:
  yubico-c-client/repos/community-x86_64/0001-https-ify-urls-and-drop-v1-selftest.patch
    (from rev 615062, yubico-c-client/trunk/0001-https-ify-urls-and-drop-v1-selftest.patch)
  yubico-c-client/repos/community-x86_64/PKGBUILD
    (from rev 615062, yubico-c-client/trunk/PKGBUILD)
Deleted:
  yubico-c-client/repos/community-x86_64/PKGBUILD

------------------------------------------------+
 0001-https-ify-urls-and-drop-v1-selftest.patch |  145 +++++++++++++++++++++++
 PKGBUILD                                       |   90 +++++++-------
 2 files changed, 194 insertions(+), 41 deletions(-)

Copied: yubico-c-client/repos/community-x86_64/0001-https-ify-urls-and-drop-v1-selftest.patch (from rev 615062, yubico-c-client/trunk/0001-https-ify-urls-and-drop-v1-selftest.patch)
===================================================================
--- 0001-https-ify-urls-and-drop-v1-selftest.patch	                        (rev 0)
+++ 0001-https-ify-urls-and-drop-v1-selftest.patch	2020-04-15 21:24:19 UTC (rev 615063)
@@ -0,0 +1,145 @@
+commit 0d45452e7fbe47e77e78ff23b480c77fd9c06f2b
+Author: Klas Lindfors <klas at yubico.com>
+Date:   Thu Nov 22 13:48:19 2018 +0100
+
+    https-ify urls and drop v1 selftest
+
+diff --git a/tests/selftest.c b/tests/selftest.c
+index 78ae43e..1f3747e 100644
+--- a/tests/selftest.c
++++ b/tests/selftest.c
+@@ -39,52 +39,6 @@
+   printf xX; \
+   printf ("\n")
+ 
+-void
+-test_v1_validation(int client_id, char *client_b64key)
+-{
+-  ykclient_t *ykc;
+-  int ret;
+-
+-  TEST(("init self"));
+-  ret = ykclient_init (&ykc);
+-  printf ("ykclient_init (%d): %s\n", ret, ykclient_strerror (ret));
+-  assert(ret == YKCLIENT_OK);
+-
+-  ykclient_set_url_template
+-    (ykc, "http://api.yubico.com/wsapi/verify?id=%d&otp=%s");
+-
+-  TEST(("null client_id, expect REPLAYED_OTP"));
+-  ykclient_set_verify_signature(ykc, 0);
+-  ykclient_set_client (ykc, client_id, 0, NULL);
+-
+-#ifndef TEST_WITHOUT_INTERNET
+-  ret = ykclient_request (ykc, "ccccccbchvthlivuitriujjifivbvtrjkjfirllluurj");
+-  printf ("ykclient_request (%d): %s\n", ret, ykclient_strerror (ret));
+-  printf ("used url: %s\n", ykclient_get_last_url (ykc));
+-  assert(ret == YKCLIENT_REPLAYED_OTP);
+-#else
+-  printf ("Test SKIPPED\n");
+-#endif
+-
+-  /* Test signed request. When signing requests to a v1 service, we must clear the nonce first. */
+-
+-  TEST(("signed request, expect REPLAYED_OTP"));
+-  ykclient_set_verify_signature(ykc, 1);
+-  ykclient_set_client_b64 (ykc, client_id, client_b64key);
+-  ykclient_set_nonce(ykc, NULL);
+-
+-#ifndef TEST_WITHOUT_INTERNET
+-  ret = ykclient_request (ykc, "ccccccbchvthlivuitriujjifivbvtrjkjfirllluurj");
+-  printf ("ykclient_request (%d): %s\n", ret, ykclient_strerror (ret));
+-  printf ("used url: %s\n", ykclient_get_last_url (ykc));
+-  assert(ret == YKCLIENT_REPLAYED_OTP);
+-#else
+-  printf ("Test SKIPPED\n");
+-#endif
+-
+-  ykclient_done (&ykc);
+-}
+-
+ #if 0
+ void
+ test_base64 (void)
+@@ -366,7 +320,7 @@ main (void)
+   TEST(("set WS 2.0 URL template"));
+   /* Set one URL and run tests with that. */
+   ykclient_set_url_template
+-    (ykc, "http://api.yubico.com/wsapi/2.0/verify?id=%d&otp=%s");
++    (ykc, "https://api.yubico.com/wsapi/2.0/verify?id=%d&otp=%s");
+ 
+ #ifndef TEST_WITHOUT_INTERNET
+   TEST(("validation request, expect REPLAYED_OTP"));
+@@ -406,11 +360,11 @@ main (void)
+ 
+   TEST(("Set and use several OLD V2.0 URLs"));
+   const char *templates[] = {
+-    "http://api.yubico.com/wsapi/2.0/verify?id=%d&otp=%s",
+-    "http://api2.yubico.com/wsapi/2.0/verify?id=%d&otp=%s",
+-    "http://api3.yubico.com/wsapi/2.0/verify?id=%d&otp=%s",
+-    "http://api4.yubico.com/wsapi/2.0/verify?id=%d&otp=%s",
+-    "http://api5.yubico.com/wsapi/2.0/verify?id=%d&otp=%s",
++    "https://api.yubico.com/wsapi/2.0/verify?id=%d&otp=%s",
++    "https://api2.yubico.com/wsapi/2.0/verify?id=%d&otp=%s",
++    "https://api3.yubico.com/wsapi/2.0/verify?id=%d&otp=%s",
++    "https://api4.yubico.com/wsapi/2.0/verify?id=%d&otp=%s",
++    "https://api5.yubico.com/wsapi/2.0/verify?id=%d&otp=%s",
+   };
+   ykclient_set_url_templates(ykc, 5, templates);
+   ykclient_set_client (ykc, client_id, 20, client_key);
+@@ -425,11 +379,11 @@ main (void)
+ 
+   TEST(("Set and use several NEW V2.0 URLs"));
+   const char *bases[] = {
+-    "http://api.yubico.com/wsapi/2.0/verify",
+-    "http://api2.yubico.com/wsapi/2.0/verify",
+-    "http://api3.yubico.com/wsapi/2.0/verify",
+-    "http://api4.yubico.com/wsapi/2.0/verify",
+-    "http://api5.yubico.com/wsapi/2.0/verify",
++    "https://api.yubico.com/wsapi/2.0/verify",
++    "https://api2.yubico.com/wsapi/2.0/verify",
++    "https://api3.yubico.com/wsapi/2.0/verify",
++    "https://api4.yubico.com/wsapi/2.0/verify",
++    "https://api5.yubico.com/wsapi/2.0/verify",
+   };
+   ykclient_set_url_bases(ykc, 5, bases);
+   ykclient_set_client (ykc, client_id, 20, client_key);
+@@ -444,11 +398,11 @@ main (void)
+ 
+   TEST(("Set a mix of bad and good URLs"));
+   const char *bad_bases[] = {
+-    "http://api.example.com/wsapi/2.0/verify",
+-    "http://api2.example.com/wsapi/2.0/verify",
+-    "http://api3.example.com/wsapi/2.0/verify",
+-    "http://api4.example.com/wsapi/2.0/verify",
+-    "http://api5.yubico.com/wsapi/2.0/verify",
++    "https://api.example.com/wsapi/2.0/verify",
++    "https://api2.example.com/wsapi/2.0/verify",
++    "https://api3.example.com/wsapi/2.0/verify",
++    "https://api4.example.com/wsapi/2.0/verify",
++    "https://api5.yubico.com/wsapi/2.0/verify",
+   };
+   ykclient_set_url_bases(ykc, 5, bad_bases);
+   ykclient_set_client (ykc, client_id, 20, client_key);
+@@ -471,8 +425,6 @@ main (void)
+   printf ("strerror(BAD_OTP): %s\n", ykclient_strerror (YKCLIENT_BAD_OTP));
+   ret = strcmp(ykclient_strerror (YKCLIENT_BAD_OTP), "Yubikey OTP was bad (BAD_OTP)"); assert (ret == 0);
+ 
+-  test_v1_validation(client_id, client_b64key);
+-
+ #if 0
+   test_base64();
+ 
+diff --git a/tool.c b/tool.c
+index 159ef64..498a303 100644
+--- a/tool.c
++++ b/tool.c
+@@ -50,7 +50,7 @@ const char *usage =
+   "\n"
+   "    --debug        Print debugging information\n"
+   "    --url URL      Validation service URL, for example,\n"
+-  "                   \"http://api.yubico.com/wsapi/verify\"\n"
++  "                   \"https://api.yubico.com/wsapi/2.0/verify\"\n"
+   "    --ca CADIR     Path to directory containing Certificate Authoritity,\n"
+   "                   e.g., \"/usr/local/etc/CERTS\"\n"
+   "    --cai CAFILE   Path to a file holding one or more certificated to\n"

Deleted: PKGBUILD
===================================================================
--- PKGBUILD	2020-04-15 21:24:16 UTC (rev 615062)
+++ PKGBUILD	2020-04-15 21:24:19 UTC (rev 615063)
@@ -1,41 +0,0 @@
-# Maintainer: Christian Hesse <mail at eworm.de>
-
-pkgname=yubico-c-client
-_shortname=ykclient
-pkgver=2.15
-pkgrel=4
-pkgdesc='Yubico YubiKey client C library'
-arch=('x86_64')
-url='https://github.com/Yubico/yubico-c-client'
-license=('BSD')
-depends=('curl' 'yubico-c')
-makedepends=('help2man')
-provides=("${_shortname}")
-conflicts=("${_shortname}")
-validpgpkeys=('0A3B0262BCA1705307D5FF06BCA00FD4B2168C0A') # Klas Lindfors <klas at yubico.com>
-source=("https://developers.yubico.com/${pkgname}/Releases/${_shortname}-${pkgver}.tar.gz"{,.sig})
-sha256sums=('f461cdefe7955d58bbd09d0eb7a15b36cb3576b88adbd68008f40ea978ea5016'
-            'SKIP')
-
-build() {
-	cd "${_shortname}-${pkgver}"
-
-	./configure \
-		--prefix=/usr
-	make
-}
-
-check() {
-	cd "${_shortname}-${pkgver}"
-
-	make check
-}
-
-package() {
-	cd "${_shortname}-${pkgver}"
-
-	install -D -m0644 COPYING "${pkgdir}/usr/share/licenses/yubico-c-client/COPYING"
-	install -D -m0644 README "${pkgdir}/usr/share/doc/yubico-c-client/README"
-	make DESTDIR="${pkgdir}/" install
-}
-

Copied: yubico-c-client/repos/community-x86_64/PKGBUILD (from rev 615062, yubico-c-client/trunk/PKGBUILD)
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2020-04-15 21:24:19 UTC (rev 615063)
@@ -0,0 +1,49 @@
+# Maintainer: Christian Hesse <mail at eworm.de>
+
+pkgname=yubico-c-client
+_shortname=ykclient
+pkgver=2.15
+pkgrel=5
+pkgdesc='Yubico YubiKey client C library'
+arch=('x86_64')
+url='https://github.com/Yubico/yubico-c-client'
+license=('BSD')
+depends=('curl' 'yubico-c')
+makedepends=('help2man')
+provides=("${_shortname}")
+conflicts=("${_shortname}")
+validpgpkeys=('0A3B0262BCA1705307D5FF06BCA00FD4B2168C0A') # Klas Lindfors <klas at yubico.com>
+source=("https://developers.yubico.com/${pkgname}/Releases/${_shortname}-${pkgver}.tar.gz"{,.sig}
+        '0001-https-ify-urls-and-drop-v1-selftest.patch')
+sha256sums=('f461cdefe7955d58bbd09d0eb7a15b36cb3576b88adbd68008f40ea978ea5016'
+            'SKIP'
+            'a1df5f6134b03bd2cd62c68815b424797980c1a7cefdf1a72f87b9b41d6dc525')
+
+prepare() {
+	cd "${_shortname}-${pkgver}"
+
+	patch -Np1 < ../0001-https-ify-urls-and-drop-v1-selftest.patch
+}
+
+build() {
+	cd "${_shortname}-${pkgver}"
+
+	./configure \
+		--prefix=/usr
+	make
+}
+
+check() {
+	cd "${_shortname}-${pkgver}"
+
+	make check
+}
+
+package() {
+	cd "${_shortname}-${pkgver}"
+
+	install -D -m0644 COPYING "${pkgdir}/usr/share/licenses/yubico-c-client/COPYING"
+	install -D -m0644 README "${pkgdir}/usr/share/doc/yubico-c-client/README"
+	make DESTDIR="${pkgdir}/" install
+}
+



More information about the arch-commits mailing list