File 3755-ssl-Fix-interop-check.patch of Package erlang
From 905b1ee296ce44edb9bb126cb32eb9164aa60b4e Mon Sep 17 00:00:00 2001
From: Ingela Anderton Andin <ingela@erlang.org>
Date: Fri, 9 Sep 2022 12:22:59 +0200
Subject: [PATCH 05/10] ssl: Fix interop check
Actually it could work for OpenSSL versions from 1.0.1 but as
it is functionality being phased out we just make a simple fix
for it to be run at least somewhere until it is phased out.
---
lib/ssl/test/ssl_test_lib.erl | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl
index e700d55ccc..ba2493bd72 100644
--- a/lib/ssl/test/ssl_test_lib.erl
+++ b/lib/ssl/test/ssl_test_lib.erl
@@ -3883,14 +3883,15 @@ erlang_ssl_receive_and_assert_negotiated_protocol(Socket, Protocol, Data) ->
{error, {{expected, Protocol}, {got, Result}}}
end.
-check_openssl_npn_support(Config) ->
- HelpText = portable_cmd("openssl", ["s_client --help"]),
- case string:str(HelpText, "nextprotoneg") of
- 0 ->
- {skip, "Openssl not compiled with nextprotoneg support"};
+check_openssl_npn_support(_Config) ->
+ case ssl_test_lib:portable_cmd("openssl", ["version"]) of
+ "OpenSSL 1.0" ++ _ ->
+ false;
+ "OpenSSL 1.1" ++ _ ->
+ true;
_ ->
- Config
- end.
+ false
+ end.
new_config(PrivDir, ServerOpts0) ->
CaCertFile = proplists:get_value(cacertfile, ServerOpts0),
--
2.35.3