diff options
author | Anders Svensson <[email protected]> | 2015-05-30 10:31:47 +0200 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2015-05-30 10:31:47 +0200 |
commit | 8260f916c2ab9b9dff9752b47e47d07ac3d95c92 (patch) | |
tree | e901cd45191dae850de941fa6cefd5360be3cc2f /lib/diameter/test/diameter_tls_SUITE.erl | |
parent | 23501295ea5289897a75cb52a23685f8e6fcf18c (diff) | |
parent | f3fefbae24a2569a13b538d80d0e99129963ebef (diff) | |
download | otp-8260f916c2ab9b9dff9752b47e47d07ac3d95c92.tar.gz otp-8260f916c2ab9b9dff9752b47e47d07ac3d95c92.tar.bz2 otp-8260f916c2ab9b9dff9752b47e47d07ac3d95c92.zip |
Merge branch 'maint'
Diffstat (limited to 'lib/diameter/test/diameter_tls_SUITE.erl')
-rw-r--r-- | lib/diameter/test/diameter_tls_SUITE.erl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/diameter/test/diameter_tls_SUITE.erl b/lib/diameter/test/diameter_tls_SUITE.erl index 55565692ec..e5bbda9c91 100644 --- a/lib/diameter/test/diameter_tls_SUITE.erl +++ b/lib/diameter/test/diameter_tls_SUITE.erl @@ -319,19 +319,19 @@ make_cert(Dir, Base) -> make_cert(Dir, Base ++ "_key.pem", Base ++ "_ca.pem"). make_cert(Dir, Keyfile, Certfile) -> - [K,C] = Paths = [filename:join([Dir, F]) || F <- [Keyfile, Certfile]], + [KP,CP] = [filename:join([Dir, F]) || F <- [Keyfile, Certfile]], - KCmd = join(["openssl genrsa -out", K, "2048"]), - CCmd = join(["openssl req -new -x509 -key", K, "-out", C, "-days 7", - "-subj /C=SE/ST=./L=Stockholm/CN=www.erlang.org"]), + KC = join(["openssl genrsa -out", KP, "2048"]), + CC = join(["openssl req -new -x509 -key", KP, "-out", CP, "-days 7", + "-subj /C=SE/ST=./L=Stockholm/CN=www.erlang.org"]), %% Hope for the best and only check that files are written. - os:cmd(KCmd), - os:cmd(CCmd), + [{_, _, {ok,_}},{_, _, {ok,_}}] + = [{P,O,T} || {P,C} <- [{KP,KC}, {CP,CC}], + O <- [os:cmd(C)], + T <- [file:read_file_info(P)]], - [_,_] = [T || P <- Paths, {ok, T} <- [file:read_file_info(P)]], - - {K,C}. + {KP,CP}. join(Strs) -> string:join(Strs, " "). |