Lines Matching +full:openssl +full:- +full:version
2 """Run Python tests against multiple installations of OpenSSL and LibreSSL
6 (1) downloads OpenSSL / LibreSSL tar bundle
8 (3) compiles OpenSSL / LibreSSL
9 (4) installs OpenSSL / LibreSSL into ../multissl/$LIB/$VERSION/
11 header and library files from ../multissl/$LIB/$VERSION/
23 (c) 2013-2017 Christian Heimes <christian@python.org>
73 "Run CPython tests with multiple OpenSSL and LibreSSL "
78 '--debug',
83 '--disable-ancient',
85 help="Don't test OpenSSL < 1.0.2 and LibreSSL < 2.5.3.",
88 '--openssl',
92 "OpenSSL versions, defaults to '{}' (ancient: '{}') if no "
93 "OpenSSL and LibreSSL versions are given."
97 '--libressl',
102 "OpenSSL and LibreSSL versions are given."
106 '--tests',
112 '--base-directory',
114 help="Base directory for OpenSSL / LibreSSL sources and builds."
117 '--no-network',
123 '--compile-only',
139 def __init__(self, version, compile_args=(), argument
141 self.version = version
145 os.path.join(basedir, self.library.lower()), version
150 self.src_dir, self.src_template.format(version))
153 self.src_dir, self.build_template.format(version))
156 return "<{0.__class__.__name__} for {0.version}>".format(self)
163 and self.version == other.version
167 return hash((self.library, self.version))
171 """openssl CLI binary"""
172 return os.path.join(self.install_dir, "bin", "openssl")
176 """output of 'bin/openssl version'"""
177 cmd = [self.openssl_cli, "version"]
185 '-c', 'import ssl; print(ssl.OPENSSL_VERSION)'
215 return out.strip().decode("utf-8")
222 url = self.url_template.format(self.version)
239 name = self.build_template.format(self.version)
253 """Now build openssl"""
256 cmd = ["./config", "shared", "--prefix={}".format(self.install_dir)]
259 # Old OpenSSL versions do not support parallel builds.
260 self._subprocess_call(["make", "-j1"], cwd=cwd)
263 self._subprocess_call(["make", "-j1", "install"], cwd=self.build_dir)
280 version = self.openssl_version
281 if self.version not in version:
282 raise ValueError(version)
286 # force a rebuild of all modules that use OpenSSL APIs
297 env["CPPFLAGS"] = "-I{}".format(self.include_dir)
298 env["LDFLAGS"] = "-L{}".format(self.lib_dir)
308 cmd = [sys.executable, "-c", "import _ssl; import _hashlib"]
312 version = self.pyssl_version
313 if self.version not in version:
314 raise ValueError(version)
318 cmd = [sys.executable, 'Lib/test/ssltests.py', '-j0']
320 cmd = [sys.executable, '-m', 'test.regrtest']
322 cmd = [sys.executable, '-m', 'test', '-j0']
324 cmd.extend(['-u', 'network', '-u', 'urlfetch'])
325 cmd.extend(['-w', '-r'])
331 library = "OpenSSL"
332 url_template = "https://www.openssl.org/source/openssl-{}.tar.gz"
333 src_template = "openssl-{}.tar.gz"
334 build_template = "openssl-{}"
340 "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-{}.tar.gz")
341 src_template = "libressl-{}.tar.gz"
342 build_template = "libressl-{}"
349 './configure', '--config-cache', '--quiet',
350 '--with-pydebug'
354 subprocess.check_call(['make', '--quiet'])
359 if not args.openssl and not args.libressl:
360 args.openssl = list(OPENSSL_RECENT_VERSIONS)
363 args.openssl.extend(OPENSSL_OLD_VERSIONS)
389 for version in args.openssl:
390 build = BuildOpenSSL(version)
394 for version in args.libressl:
395 build = BuildLibreSSL(version)
415 datetime.now() - start
417 print('Python: ', sys.version)
425 print('OpenSSL / LibreSSL versions:')
427 print(" * {0.library} {0.version}".format(build))