diff options
author | Ingela Anderton Andin <[email protected]> | 2019-05-28 16:23:56 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2019-05-28 16:23:56 +0200 |
commit | 6310fbd9871f521826d4672395e48e2ef94d59a9 (patch) | |
tree | 270d5b3ade0a2ab815a361960a1df275b31c7fcb /lib/ssl/test | |
parent | 0e72e780498e47614de5730c8d4453948c9ad1da (diff) | |
parent | a04228cc4ebe53af4e676cc6a7642e3a1025cc3f (diff) | |
download | otp-6310fbd9871f521826d4672395e48e2ef94d59a9.tar.gz otp-6310fbd9871f521826d4672395e48e2ef94d59a9.tar.bz2 otp-6310fbd9871f521826d4672395e48e2ef94d59a9.zip |
Merge branch 'ingela/ssl/alert-strings/OTP-15844' into maint
Diffstat (limited to 'lib/ssl/test')
-rw-r--r-- | lib/ssl/test/ssl_test_lib.erl | 30 |
1 files changed, 24 insertions, 6 deletions
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl index 3b161a0c8a..733ee993a8 100644 --- a/lib/ssl/test/ssl_test_lib.erl +++ b/lib/ssl/test/ssl_test_lib.erl @@ -429,14 +429,17 @@ check_result(Pid, Msg) -> end. check_server_alert(Pid, Alert) -> receive - {Pid, {error, {tls_alert, {Alert, _}}}} -> + {Pid, {error, {tls_alert, {Alert, STxt}}}} -> + check_server_txt(STxt), ok end. check_server_alert(Server, Client, Alert) -> receive - {Server, {error, {tls_alert, {Alert, _}}}} -> + {Server, {error, {tls_alert, {Alert, STxt}}}} -> + check_server_txt(STxt), receive - {Client, {error, {tls_alert, {Alert, _}}}} -> + {Client, {error, {tls_alert, {Alert, CTxt}}}} -> + check_client_txt(CTxt), ok; {Client, {error, closed}} -> ok @@ -444,20 +447,35 @@ check_server_alert(Server, Client, Alert) -> end. check_client_alert(Pid, Alert) -> receive - {Pid, {error, {tls_alert, {Alert, _}}}} -> + {Pid, {error, {tls_alert, {Alert, CTxt}}}} -> + check_client_txt(CTxt), ok end. check_client_alert(Server, Client, Alert) -> receive - {Client, {error, {tls_alert, {Alert, _}}}} -> + {Client, {error, {tls_alert, {Alert, CTxt}}}} -> + check_client_txt(CTxt), receive - {Server, {error, {tls_alert, {Alert, _}}}} -> + {Server, {error, {tls_alert, {Alert, STxt}}}} -> + check_server_txt(STxt), ok; {Server, {error, closed}} -> ok end end. +check_server_txt("TLS server" ++ _) -> + ok; +check_server_txt("DTLS server" ++ _) -> + ok; +check_server_txt(Txt) -> + ct:fail({expected_server, {got, Txt}}). +check_client_txt("TLS client" ++ _) -> + ok; +check_client_txt("DTLS client" ++ _) -> + ok; +check_client_txt(Txt) -> + ct:fail({expected_server, {got, Txt}}). wait_for_result(Server, ServerMsg, Client, ClientMsg) -> receive |