diff options
author | Ingela Andin <[email protected]> | 2019-03-25 09:22:22 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2019-03-25 09:22:22 +0100 |
commit | 07f8099865b5a5d38e56684186e52345f955af48 (patch) | |
tree | ac4179223523817f4c356af3bb335e745a03ee40 /lib/ssl/test/ssl_test_lib.erl | |
parent | 167c5ef4d804ab84979284ef4f572a69d6d9ddf8 (diff) | |
parent | b88f0eae83f665cdc902f683e9869e40b82880c8 (diff) | |
download | otp-07f8099865b5a5d38e56684186e52345f955af48.tar.gz otp-07f8099865b5a5d38e56684186e52345f955af48.tar.bz2 otp-07f8099865b5a5d38e56684186e52345f955af48.zip |
Merge pull request #2192 from IngelaAndin/ingela/ssl/test-enhancement
ssl: Enhance testing
Diffstat (limited to 'lib/ssl/test/ssl_test_lib.erl')
-rw-r--r-- | lib/ssl/test/ssl_test_lib.erl | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl index 7f8e81dbd8..f79f57fbd7 100644 --- a/lib/ssl/test/ssl_test_lib.erl +++ b/lib/ssl/test/ssl_test_lib.erl @@ -514,13 +514,6 @@ wait_for_result(Pid, Msg) -> %% Unexpected end. -user_lookup(psk, _Identity, UserState) -> - {ok, UserState}; -user_lookup(srp, Username, _UserState) -> - Salt = ssl_cipher:random_bytes(16), - UserPassHash = crypto:hash(sha, [Salt, crypto:hash(sha, [Username, <<$:>>, <<"secret">>])]), - {ok, {srp_1024, Salt, UserPassHash}}. - cert_options(Config) -> ClientCaCertFile = filename:join([proplists:get_value(priv_dir, Config), "client", "cacerts.pem"]), @@ -2378,4 +2371,10 @@ reuse_session(ClientOpts, ServerOpts, Config) -> ssl_test_lib:close(Server1), ssl_test_lib:close(Client3), ssl_test_lib:close(Client4). - + +user_lookup(psk, _Identity, UserState) -> + {ok, UserState}; +user_lookup(srp, Username, _UserState) -> + Salt = ssl_cipher:random_bytes(16), + UserPassHash = crypto:hash(sha, [Salt, crypto:hash(sha, [Username, <<$:>>, <<"secret">>])]), + {ok, {srp_1024, Salt, UserPassHash}}. |