aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ssh/test
diff options
context:
space:
mode:
authorHans Nilsson <[email protected]>2015-10-23 18:33:05 +0200
committerHans Nilsson <[email protected]>2015-11-04 12:10:06 +0100
commit961bb51d1b73c6ff2ad5f08e0a4c13fbfc2fbb98 (patch)
treeb71404f6e2fc8d5369667275ee5769675c2a32c2 /lib/ssh/test
parentc50a9a6562a14f3a9fbd2071e3b19eed8c9c9b4b (diff)
downloadotp-961bb51d1b73c6ff2ad5f08e0a4c13fbfc2fbb98.tar.gz
otp-961bb51d1b73c6ff2ad5f08e0a4c13fbfc2fbb98.tar.bz2
otp-961bb51d1b73c6ff2ad5f08e0a4c13fbfc2fbb98.zip
ssh: option dh_gex_groups with tag ssh_moduli_file
Makes this existing option also accept a file in openssh format OTP-13052
Diffstat (limited to 'lib/ssh/test')
-rw-r--r--lib/ssh/test/ssh_protocol_SUITE.erl11
-rw-r--r--lib/ssh/test/ssh_protocol_SUITE_data/dh_group_test.moduli3
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/ssh/test/ssh_protocol_SUITE.erl b/lib/ssh/test/ssh_protocol_SUITE.erl
index 9d54f14ff6..0292c8d149 100644
--- a/lib/ssh/test/ssh_protocol_SUITE.erl
+++ b/lib/ssh/test/ssh_protocol_SUITE.erl
@@ -67,6 +67,7 @@ groups() ->
{kex, [], [no_common_alg_server_disconnects,
no_common_alg_client_disconnects,
gex_client_init_option_groups,
+ gex_client_init_option_groups_moduli_file,
gex_client_init_option_groups_file
]},
{service_requests, [], [bad_service_name,
@@ -90,6 +91,7 @@ init_per_testcase(no_common_alg_server_disconnects, Config) ->
start_std_daemon(Config, [{preferred_algorithms,[{public_key,['ssh-rsa']}]}]);
init_per_testcase(TC, Config) when TC == gex_client_init_option_groups ;
+ TC == gex_client_init_option_groups_moduli_file ;
TC == gex_client_init_option_groups_file ->
Opts = case TC of
gex_client_init_option_groups ->
@@ -98,6 +100,10 @@ init_per_testcase(TC, Config) when TC == gex_client_init_option_groups ;
DataDir = ?config(data_dir, Config),
F = filename:join(DataDir, "dh_group_test"),
[{dh_gex_groups, {file,F}}];
+ gex_client_init_option_groups_moduli_file ->
+ DataDir = ?config(data_dir, Config),
+ F = filename:join(DataDir, "dh_group_test.moduli"),
+ [{dh_gex_groups, {ssh_moduli_file,F}}];
_ ->
[]
end,
@@ -110,6 +116,7 @@ init_per_testcase(_TestCase, Config) ->
end_per_testcase(no_common_alg_server_disconnects, Config) ->
stop_std_daemon(Config);
end_per_testcase(TC, Config) when TC == gex_client_init_option_groups ;
+ TC == gex_client_init_option_groups_moduli_file ;
TC == gex_client_init_option_groups_file ->
stop_std_daemon(Config);
end_per_testcase(_TestCase, Config) ->
@@ -335,6 +342,10 @@ gex_client_init_option_groups_file(Config) ->
do_gex_client_init(Config, {2000, 2048, 4000},
{5,61}).
+gex_client_init_option_groups_moduli_file(Config) ->
+ do_gex_client_init(Config, {2000, 2048, 4000},
+ {5,16#B7}).
+
do_gex_client_init(Config, {Min,N,Max}, {G,P}) ->
{ok,_} =
ssh_trpt_test_lib:exec(
diff --git a/lib/ssh/test/ssh_protocol_SUITE_data/dh_group_test.moduli b/lib/ssh/test/ssh_protocol_SUITE_data/dh_group_test.moduli
new file mode 100644
index 0000000000..f6995ba4c9
--- /dev/null
+++ b/lib/ssh/test/ssh_protocol_SUITE_data/dh_group_test.moduli
@@ -0,0 +1,3 @@
+20151021104105 2 6 100 2222 5 B7
+20151021104106 2 6 100 1111 5 4F
+