File: 06-no-openssl-version-check-autopkgtest.patch

package info (click to toggle)
stunnel4 3%3A5.76-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,396 kB
  • sloc: ansic: 19,572; sh: 4,958; python: 4,950; perl: 437; makefile: 227
file content (31 lines) | stat: -rw-r--r-- 1,721 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Description: Disable OpenSSL version checks on autopkgtests
 During its test suite, this package checks that it runs using the same OpenSSL
 version it's been compiled with. While this is somewhat reasonable in a
 development or building context, this approach breaks when trying to run the
 test suite to check for regressions against a new ABI-compatible version of libssl.
 .
 This patch tries to detect such an environment and removes the checks for it
 there.
Author: Simon Chopin <simon.chopin@canonical.com>
Bug-Debian: https://bugs.debian.org/1010698
Forwarded: not-needed, patch only makes sense in a distro context
Last-Update: 2024-02-14

--- a/tests/maketest.py
+++ b/tests/maketest.py
@@ -383,10 +383,11 @@
                 openssl_version = match.group("version")
         if not openssl_version:
             raise UnsupportedVersion("Stunnel was compiled and run with different OpenSSL versions")
-        #TLSv1.1 and TLSv1.2 available only with OpenSSL version 1.0.1 and later
-        if openssl_version < "1.0.1":
-            raise UnsupportedVersion(
-                f"OpenSSL version {openssl_version} is deprecated and not supported")
+            #TLSv1.1 and TLSv1.2 available only with OpenSSL version 1.0.1 and later
+        if not 'AUTOPKGTEST_TMP' in os.environ:
+            if openssl_version < "1.0.1":
+                raise UnsupportedVersion(
+                    f"OpenSSL version {openssl_version} is deprecated and not supported")
         if not (sys.version_info.major == 3 and sys.version_info.minor >= 7):
             raise UnsupportedVersion("Python 3.7 or higher is required.\n"
                 + "You are using Python {sys.version_info.major}.{sys.version_info.minor}.")