Группа :: Система/Библиотеки
Пакет: gnutls30
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: tests-Fix-work-with-ALT-faketime.patch
Скачать
Скачать
From cc6998bf996672a79b2b324e6c5b9554036da2a4 Mon Sep 17 00:00:00 2001
From: Mikhail Efremov <sem@altlinux.org>
Date: Mon, 7 Aug 2023 17:59:32 +0300
Subject: [PATCH] Fix work with ALT faketime
ALT faketime hasn't '-f' option and requires '-d'.
Fortunately date format in the gnutls tests compatibale with
ALT faketime -d.
---
gnutls/configure.ac | 2 +-
gnutls/tests/cert-reencoding.sh | 2 +-
gnutls/tests/ocsp-tests/ocsp-must-staple-connection.sh | 2 +-
gnutls/tests/ocsp-tests/ocsp-tls-connection.sh | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gnutls/configure.ac b/gnutls/configure.ac
index 8a841ec06..da93c385a 100644
--- a/gnutls/configure.ac
+++ b/gnutls/configure.ac
@@ -66,7 +66,7 @@ AM_MISSING_PROG([ASN1PARSER], [asn1Parser])
AM_MISSING_PROG([PERL], [perl])
AC_CHECK_PROGS([FAKETIME], [faketime])
-AS_IF([test -n "$FAKETIME"], [FAKETIME_F_OPT="-f"; AC_SUBST([FAKETIME_F_OPT])], [
+AS_IF([test -n "$FAKETIME"], [FAKETIME_F_OPT="-d"; AC_SUBST([FAKETIME_F_OPT])], [
AC_CHECK_PROGS([DATEFUDGE], [datefudge])
AS_IF([test -n "$DATEFUDGE"], [
FAKETIME_F_OPT="-s"
diff --git a/gnutls/tests/cert-reencoding.sh b/gnutls/tests/cert-reencoding.sh
index 56eb8f203..ff48237be 100755
--- a/gnutls/tests/cert-reencoding.sh
+++ b/gnutls/tests/cert-reencoding.sh
@@ -243,7 +243,7 @@ TESTDATE="2018-03-01 00:00:00"
# Start OpenSSL TLS server
#
launch_bare_server \
- "$FAKETIME" "${TESTDATE}" \
+ "$FAKETIME" -d "${TESTDATE}" \
"${OPENSSL}" s_server -cert ${SERVER_CERT_FILE} -key ${SERVER_KEY_FILE} \
-CAfile ${CA_FILE} -port ${PORT} -Verify 1 -verify_return_error -www
SERVER_PID="${!}"
diff --git a/gnutls/tests/ocsp-tests/ocsp-must-staple-connection.sh b/gnutls/tests/ocsp-tests/ocsp-must-staple-connection.sh
index 94d41ce24..7c9065305 100755
--- a/gnutls/tests/ocsp-tests/ocsp-must-staple-connection.sh
+++ b/gnutls/tests/ocsp-tests/ocsp-must-staple-connection.sh
@@ -130,7 +130,7 @@ cp "${srcdir}/ocsp-tests/certs/ocsp_index.txt.attr" ${ATTRFILE}
# SO_REUSEADDR usage.
PORT=${OCSP_PORT}
launch_bare_server \
- "$FAKETIME" "${TESTDATE}" \
+ "$FAKETIME" -d "${TESTDATE}" \
"${OPENSSL}" ocsp -index "${INDEXFILE}" -text \
-port "${OCSP_PORT}" \
-rsigner "${srcdir}/ocsp-tests/certs/ocsp-server.pem" \
diff --git a/gnutls/tests/ocsp-tests/ocsp-tls-connection.sh b/gnutls/tests/ocsp-tests/ocsp-tls-connection.sh
index 4ca20417e..257d3d85d 100755
--- a/gnutls/tests/ocsp-tests/ocsp-tls-connection.sh
+++ b/gnutls/tests/ocsp-tests/ocsp-tls-connection.sh
@@ -112,7 +112,7 @@ echo "=== Bringing OCSP server up ==="
# SO_REUSEADDR usage.
PORT=${OCSP_PORT}
launch_bare_server \
- "$FAKETIME" "${TESTDATE}" \
+ "$FAKETIME" -d "${TESTDATE}" \
"${OPENSSL}" ocsp -index "${srcdir}/ocsp-tests/certs/ocsp_index.txt" -text \
-port "${OCSP_PORT}" \
-rsigner "${srcdir}/ocsp-tests/certs/ocsp-server.pem" \
--
2.33.8