Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:Ledest:erlang:24
erlang
3752-ssl-Fix-ALPN-interop-check.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 3752-ssl-Fix-ALPN-interop-check.patch of Package erlang
From 82c0d87728debac434be3863e3ce54aacd19352e Mon Sep 17 00:00:00 2001 From: Ingela Anderton Andin <ingela@erlang.org> Date: Fri, 9 Sep 2022 10:36:57 +0200 Subject: [PATCH 02/10] ssl: Fix ALPN interop check --- lib/ssl/test/openssl_alpn_SUITE.erl | 24 ++++++++++++++++++------ lib/ssl/test/ssl_test_lib.erl | 1 + 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/lib/ssl/test/openssl_alpn_SUITE.erl b/lib/ssl/test/openssl_alpn_SUITE.erl index 545f261482..c64a7a3e87 100644 --- a/lib/ssl/test/openssl_alpn_SUITE.erl +++ b/lib/ssl/test/openssl_alpn_SUITE.erl @@ -474,11 +474,23 @@ erlang_server_alpn_npn_openssl_client_alpn_npn(Config) when is_list(Config) -> %%-------------------------------------------------------------------- %% Internal functions ----------------------------------------------- %%-------------------------------------------------------------------- -check_openssl_alpn_support(Config) -> - HelpText = ssl_test_lib:portable_cmd("openssl", ["s_client --help"]), - case string:str(HelpText, "alpn") of - 0 -> - {skip, "Openssl not compiled with alpn support"}; +check_openssl_alpn_support(_Config) -> + case ssl_test_lib:portable_cmd("openssl", ["version"]) of + "OpenSSL 1.0." ++ _ = Str-> + SubStr = Str -- "OpenSSL 1.0.", + atleast(SubStr, 2) andalso (not ssl_test_lib:is_fips(openssl)); + "OpenSSL 1.1" ++ _ -> + not ssl_test_lib:is_fips(openssl); + "OpenSSL 3" ++ _ -> + not ssl_test_lib:is_fips(openssl); + "LibreSSL 2.0" ++ _ -> + false; + "LibreSSL 2.1." ++ _ = Str -> + SubStr = Str -- "LibreSSL 2.1.", + atleast(SubStr, 3); _ -> - Config + false end. + +atleast([StrNum|_], Num) -> + list_to_integer([StrNum]) >= Num. diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl index 06988aa307..e700d55ccc 100644 --- a/lib/ssl/test/ssl_test_lib.erl +++ b/lib/ssl/test/ssl_test_lib.erl @@ -198,6 +198,7 @@ openssl_allows_server_renegotiate/1, openssl_maxfraglen_support/0, is_sane_oppenssl_pss/1, + is_fips/1, consume_port_exit/1, is_sane_oppenssl_client/0, openssl_sane_dtls_session_reuse/0, -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor