• Home
  • Raw
  • Download

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>
70 "Run CPython tests with multiple OpenSSL and LibreSSL "
75 '--debug',
80 '--disable-ancient',
82 help="Don't test OpenSSL and LibreSSL versions without upstream support",
85 '--openssl',
89 "OpenSSL versions, defaults to '{}' (ancient: '{}') if no "
90 "OpenSSL and LibreSSL versions are given."
94 '--libressl',
99 "OpenSSL and LibreSSL versions are given."
103 '--tests',
109 '--base-directory',
111 help="Base directory for OpenSSL / LibreSSL sources and builds."
114 '--no-network',
120 '--steps',
124 "Which steps to perform. 'library' downloads and compiles OpenSSL "
130 '--system',
135 '--force',
141 '--keep-sources',
163 def __init__(self, version, args): argument
164 self.version = version
168 os.path.join(args.base_directory, self.library.lower()), version
173 self.src_dir, self.src_template.format(version))
176 self.src_dir, self.build_template.format(version))
180 return "<{0.__class__.__name__} for {0.version}>".format(self)
187 and self.version == other.version
191 return hash((self.library, self.version))
195 """Short version for OpenSSL download URL"""
200 """openssl CLI binary"""
201 return os.path.join(self.install_dir, "bin", "openssl")
205 """output of 'bin/openssl version'"""
206 cmd = [self.openssl_cli, "version"]
214 '-c', 'import ssl; print(ssl.OPENSSL_VERSION)'
244 return out.strip().decode("utf-8")
253 url = url_template.format(v=self.version, s=self.short_version)
280 name = self.build_template.format(self.version)
294 """Now build openssl"""
299 "shared", "--debug",
300 "--prefix={}".format(self.install_dir)
302 # cmd.extend(["no-deprecated", "--api=1.1.0"])
311 ["make", "-j1", self.depend_target], cwd=cwd, env=env
313 self._subprocess_call(["make", f"-j{self.jobs}"], cwd=cwd, env=env)
317 ["make", "-j1", self.install_target],
340 version = self.openssl_version
341 if self.version not in version:
342 raise ValueError(version)
346 # force a rebuild of all modules that use OpenSSL APIs
357 env["CPPFLAGS"] = "-I{}".format(self.include_dir)
358 env["LDFLAGS"] = "-L{}".format(self.lib_dir)
368 cmd = [sys.executable, "-c", "import _ssl; import _hashlib"]
372 version = self.pyssl_version
373 if self.version not in version:
374 raise ValueError(version)
381 '-j0'
384 cmd = [sys.executable, '-m', 'test.regrtest']
386 cmd = [sys.executable, '-m', 'test', '-j0']
388 cmd.extend(['-u', 'network', '-u', 'urlfetch'])
389 cmd.extend(['-w', '-r'])
395 library = "OpenSSL"
397 "https://www.openssl.org/source/openssl-{v}.tar.gz",
398 "https://www.openssl.org/source/old/{s}/openssl-{v}.tar.gz"
400 src_template = "openssl-{}.tar.gz"
401 build_template = "openssl-{}"
407 if self.version.startswith("3."):
411 if self.version.startswith("3."):
412 config_args += ("enable-fips",)
419 ["make", "-j1", "install_ssldirs", "install_fips"],
423 # 3.0.0-beta2 uses lib64 on 64 bit platforms
429 """Short version for OpenSSL download URL"""
430 mo = re.search(r"^(\d+)\.(\d+)\.(\d+)", self.version)
435 # OpenSSL 3.0.0 -> /old/3.0/
442 "https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-{v}.tar.gz",
444 src_template = "libressl-{}.tar.gz"
445 build_template = "libressl-{}"
452 './configure', '--config-cache', '--quiet',
453 '--with-pydebug'
457 subprocess.check_call(['make', '--quiet'])
462 if not args.openssl and not args.libressl:
463 args.openssl = list(OPENSSL_RECENT_VERSIONS)
466 args.openssl.extend(OPENSSL_OLD_VERSIONS)
492 for version in args.openssl:
494 version,
500 for version in args.libressl:
502 version,
525 datetime.now() - start
527 print('Python: ', sys.version)
534 print('OpenSSL / LibreSSL versions:')
536 print(" * {0.library} {0.version}".format(build))