build: handle malformed OpenSSL macros

A missing OPENSSL_VERSION_NUMBER macro raises TypeError while the
configure logic attempts to slice None. Treat that like the other
version detection failures so configure warns and records version 0.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64982
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
This commit is contained in:
Filip Skokan authored and Antoine du Hamel committed 2026-08-26 00:55:34 +02:00
1 parent 92e3110462
commit 29a2ecefeb
1 file changed
+1 -1
+1 -1
View File
@@ -1517,7 +1517,7 @@ def get_openssl_version(o):
return version_number
except (OSError, ValueError, subprocess.SubprocessError) as e:
except (OSError, TypeError, ValueError, subprocess.SubprocessError) as e:
warn(f'Failed to determine OpenSSL version from header: {e}')
return 0