diff --git a/third_party/openpgp.configure b/third_party/openpgp.configure index ca12d54b43..2ea7163b87 100644 --- a/third_party/openpgp.configure +++ b/third_party/openpgp.configure @@ -250,7 +250,7 @@ with only_when(in_tree_librnp): help="OpenSSL library prefix (when not found by pkgconfig)", ) 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) @@ -282,7 +282,7 @@ with only_when(in_tree_librnp): @imports(_from="textwrap", _import="dedent") @imports(_from="__builtin__", _import="chr") 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: die( "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): # 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) ossl_major = (ver_as_int & 0xF0000000) >> 28 ossl_minor = (ver_as_int & 0x0FF00000) >> 20 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}" if ver_as_int < MIN_OSSL_VER: 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] if major_version != "3": 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}.")