Bug 1805215 - Require openssl >= 1.1.1e. r=kaie
The EVP_PKEY_CTX_set_dsa_paramgen_q_bits is declared only in >= 1.1.1e. Differential Revision: https://phabricator.services.mozilla.com/D164468 --HG-- extra : amend_source : d81054713a6087580ce0895db54d3929a4cb9af2
This commit is contained in:
Родитель
51e3986fe6
Коммит
3baa5f036b
|
@ -250,7 +250,7 @@ with only_when(in_tree_librnp):
|
||||||
help="OpenSSL library prefix (when not found by pkgconfig)",
|
help="OpenSSL library prefix (when not found by pkgconfig)",
|
||||||
)
|
)
|
||||||
openssl_pkg = pkg_check_modules(
|
openssl_pkg = pkg_check_modules(
|
||||||
"MZLA_LIBRNP_OPENSSL", "openssl > 1.1.1", allow_missing=True, config=False
|
"MZLA_LIBRNP_OPENSSL", "openssl >= 1.1.1e", allow_missing=True, config=False
|
||||||
)
|
)
|
||||||
|
|
||||||
@depends_if("--with-openssl", openssl_pkg)
|
@depends_if("--with-openssl", openssl_pkg)
|
||||||
|
@ -282,7 +282,7 @@ with only_when(in_tree_librnp):
|
||||||
@imports(_from="textwrap", _import="dedent")
|
@imports(_from="textwrap", _import="dedent")
|
||||||
@imports(_from="__builtin__", _import="chr")
|
@imports(_from="__builtin__", _import="chr")
|
||||||
def openssl_version(compiler, openssl_flags):
|
def openssl_version(compiler, openssl_flags):
|
||||||
log.info("Checking for OpenSSL >= 1.1.1")
|
log.info("Checking for OpenSSL >= 1.1.1e")
|
||||||
if openssl_flags is None:
|
if openssl_flags is None:
|
||||||
die(
|
die(
|
||||||
"OpenSSL not found. Must be locatable with pkg-config or use --with-openssl."
|
"OpenSSL not found. Must be locatable with pkg-config or use --with-openssl."
|
||||||
|
@ -290,12 +290,12 @@ with only_when(in_tree_librnp):
|
||||||
|
|
||||||
def ossl_hexver(hex_str):
|
def ossl_hexver(hex_str):
|
||||||
# See opensshlv.h for description of OPENSSL_VERSION_NUMBER
|
# See opensshlv.h for description of OPENSSL_VERSION_NUMBER
|
||||||
MIN_OSSL_VER = 0x1010100F # Version 1.1.1
|
MIN_OSSL_VER = 0x1010105F # Version 1.1.1e
|
||||||
ver_as_int = int(hex_str[:-1], 16)
|
ver_as_int = int(hex_str[:-1], 16)
|
||||||
ossl_major = (ver_as_int & 0xF0000000) >> 28
|
ossl_major = (ver_as_int & 0xF0000000) >> 28
|
||||||
ossl_minor = (ver_as_int & 0x0FF00000) >> 20
|
ossl_minor = (ver_as_int & 0x0FF00000) >> 20
|
||||||
ossl_fix = (ver_as_int & 0x000FF000) >> 12
|
ossl_fix = (ver_as_int & 0x000FF000) >> 12
|
||||||
ossl_patch = chr(96 + (ver_as_int & 0x00000FF0) >> 4) # as a letter a-z
|
ossl_patch = chr(96 + ((ver_as_int & 0x00000FF0) >> 4)) # as a letter a-z
|
||||||
ver_as_str = f"{ossl_major}.{ossl_minor}.{ossl_fix}{ossl_patch}"
|
ver_as_str = f"{ossl_major}.{ossl_minor}.{ossl_fix}{ossl_patch}"
|
||||||
if ver_as_int < MIN_OSSL_VER:
|
if ver_as_int < MIN_OSSL_VER:
|
||||||
die(f"OpenSSL version {ver_as_str} is too old.")
|
die(f"OpenSSL version {ver_as_str} is too old.")
|
||||||
|
@ -332,7 +332,7 @@ with only_when(in_tree_librnp):
|
||||||
major_version = openssl_ver.split(".")[0]
|
major_version = openssl_ver.split(".")[0]
|
||||||
if major_version != "3":
|
if major_version != "3":
|
||||||
die(
|
die(
|
||||||
"Unrecognized OpenSSL version {openssl_version} found. Require >= 1.1.1 or 3.x.x"
|
"Unrecognized OpenSSL version {openssl_version} found. Require >= 1.1.1e or 3.x.x"
|
||||||
)
|
)
|
||||||
|
|
||||||
log.info(f"Found OpenSSL {openssl_ver}.")
|
log.info(f"Found OpenSSL {openssl_ver}.")
|
||||||
|
|
Загрузка…
Ссылка в новой задаче