summaryrefslogtreecommitdiff
path: root/lib/crypto
diff options
context:
space:
mode:
authorSverker Eriksson <sverker@erlang.org>2022-11-11 14:56:56 +0100
committerSverker Eriksson <sverker@erlang.org>2022-11-11 14:56:56 +0100
commit36e7d1508f2f21af2372ac2484ad637c126c318a (patch)
treeb08c7e047cd568517519dcf1b435500a133b7884 /lib/crypto
parent7da89b77373985277892ab8b957550be5ca2474d (diff)
parent5782f60e78b98289443418940145d2e53260883a (diff)
downloaderlang-36e7d1508f2f21af2372ac2484ad637c126c318a.tar.gz
Merge branch 'maint'
Diffstat (limited to 'lib/crypto')
-rw-r--r--lib/crypto/test/crypto_SUITE.erl22
1 files changed, 18 insertions, 4 deletions
diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl
index dc105d1f8c..516ad02ee2 100644
--- a/lib/crypto/test/crypto_SUITE.erl
+++ b/lib/crypto/test/crypto_SUITE.erl
@@ -1446,17 +1446,31 @@ rand_plugin_s(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
info(_Config) ->
[{_,_,VerBin}] = crypto:info_lib(),
- Ver = binary:bin_to_list(VerBin),
+ LibVer = binary:bin_to_list(VerBin),
try
crypto:info()
of
- #{cryptolib_version_compiled := Ver,
- cryptolib_version_linked := Ver,
+ #{cryptolib_version_compiled := LibVer,
+ cryptolib_version_linked := LibVer,
compile_type := Tc,
link_type := Tl} when is_atom(Tc), is_atom(Tl) ->
ok;
+
+ %% Version strings in header vs lib seen to differ slightly on SUSE
+ %% but OpenSSL version numbers should be the same
+ #{cryptolib_version_compiled := CompVer,
+ cryptolib_version_linked := LibVer,
+ compile_type := Tc,
+ link_type := Tl} when is_atom(Tc), is_atom(Tl) ->
+ RE = "OpenSSL (\\d+\\.\\d+\\.\\d+.)",
+ Opts = [{capture,first,list}],
+ {match,[CompV]} = re:run(CompVer, RE, Opts),
+ {match,[LinkV]} = re:run(LibVer, RE, Opts),
+ {CompV,CompV} = {CompV,LinkV},
+ ok;
+
Other ->
- ct:log("Ver = ~p~ncrypto:info() -> ~p", [Ver,Other]),
+ ct:log("LibVer = ~p~ncrypto:info() -> ~p", [LibVer,Other]),
ct:fail("Version mismatch", [])
catch
C:E ->