guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/04: gnu: gnutls: Fix status-request-revoked test.


From: guix-commits
Subject: 03/04: gnu: gnutls: Fix status-request-revoked test.
Date: Sat, 6 Feb 2021 21:38:21 -0500 (EST)

marusich pushed a commit to branch wip-ppc64le
in repository guix.

commit 72aaeac6b587fcee439987ecb3a4cbe9f0936bde
Author: Leo Le Bouter <lle-bout@zaclys.net>
AuthorDate: Sat Feb 6 18:36:40 2021 +0100

    gnu: gnutls: Fix status-request-revoked test.
    
    * gnu/packages/patches/gnutls-fix-status-request-revoked.patch: New patch.
    * gnu/local.mk (dist_patch_DATA): Register it.
    * gnu/packages/tls.scm (gnutls)[patches]: Add it.
    
    Signed-off-by: Chris Marusich <cmmarusich@gmail.com>
---
 gnu/local.mk                                       |  2 +
 .../gnutls-fix-status-request-revoked.patch        | 48 ++++++++++++++++++++++
 gnu/packages/tls.scm                               |  5 ++-
 3 files changed, 54 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index e93425f..612ecbe 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -40,6 +40,7 @@
 # Copyright © 2020 Malte Frank Gerdes <mate.f.gerdes@gmail.com>
 # Copyright © 2020 Vinicius Monego <monego@posteo.net>
 # Copyright © 2021 Björn Höfling <bjoern.hoefling@bjoernhoefling.de>
+# Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
 #
 # This file is part of GNU Guix.
 #
@@ -1108,6 +1109,7 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/gnome-todo-delete-esource-duplicate.patch \
   %D%/packages/patches/gnome-tweaks-search-paths.patch         \
   %D%/packages/patches/gnupg-default-pinentry.patch            \
+  %D%/packages/patches/gnutls-fix-status-request-revoked.patch \
   %D%/packages/patches/gnutls-skip-trust-store-test.patch      \
   %D%/packages/patches/gnutls-cross.patch                      \
   %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \
diff --git a/gnu/packages/patches/gnutls-fix-status-request-revoked.patch 
b/gnu/packages/patches/gnutls-fix-status-request-revoked.patch
new file mode 100644
index 0000000..ec7285f
--- /dev/null
+++ b/gnu/packages/patches/gnutls-fix-status-request-revoked.patch
@@ -0,0 +1,48 @@
+From ed208fe55f31478732fd6cc394f9576b315a42cd Mon Sep 17 00:00:00 2001
+From: "Bernhard M. Wiedemann" <bwiedemann@suse.de>
+Date: Sun, 5 Apr 2020 15:09:57 +0200
+Subject: [PATCH] tests: Fix status-request-revoked after 2020-10-24
+
+included certs expire 2020-10-24 so this test fails after that date.
+
+Fixes #967
+
+This patch was done while working on reproducible builds for openSUSE.
+
+Signed-off-by: Bernhard M. Wiedemann <bwiedemann@suse.de>
+---
+ tests/status-request-revoked.c | 11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+diff --git a/tests/status-request-revoked.c b/tests/status-request-revoked.c
+index b4033214cb..0268934647 100644
+--- a/tests/status-request-revoked.c
++++ b/tests/status-request-revoked.c
+@@ -65,6 +65,16 @@ static void client_log_func(int level, const char *str)
+       fprintf(stderr, "client|<%d>| %s", level, str);
+ }
+ 
++static time_t mytime(time_t * t)
++{
++      time_t then = 1586000000;
++
++      if (t)
++              *t = then;
++
++      return then;
++}
++
+ static unsigned char server_cert_pem[] =
+ "-----BEGIN CERTIFICATE-----\n"
+ "MIIEKjCCAhKgAwIBAgIIRiBQA6KFBj0wDQYJKoZIhvcNAQELBQAwDzENMAsGA1UE\n"
+@@ -252,6 +262,7 @@ static int cert_verify_callback(gnutls_session_t session)
+       unsigned int status;
+       int ret;
+ 
++      gnutls_global_set_time_function(mytime);
+       ret = gnutls_certificate_verify_peers2(session, &status);
+       if (ret < 0)
+               return -1;
+-- 
+GitLab
+
diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm
index 8e438e3..0294c9d 100644
--- a/gnu/packages/tls.scm
+++ b/gnu/packages/tls.scm
@@ -15,6 +15,7 @@
 ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org>
 ;;; Copyright © 2019 Mathieu Othacehe <m.othacehe@gmail.com>
 ;;; Copyright © 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -175,7 +176,9 @@ living in the same process.")
               (string-append "mirror://gnupg/gnutls/v"
                              (version-major+minor version)
                              "/gnutls-" version ".tar.xz"))
-             (patches (search-patches "gnutls-skip-trust-store-test.patch"))
+             (patches
+              (search-patches "gnutls-skip-trust-store-test.patch"
+                              "gnutls-fix-status-request-revoked.patch"))
              (sha256
               (base32
                "0jvca1qahn9lrwv6f5kfs95icirc15b2a8x9fzczyj996ipg3b5z"))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]