diff options
author | Niclas Eklund <[email protected]> | 2011-03-31 16:48:44 +0200 |
---|---|---|
committer | Niclas Eklund <[email protected]> | 2011-05-19 14:38:23 +0200 |
commit | 2fb636273a06d31f0c24dcecf9302cd6561f02af (patch) | |
tree | 2c4dd03271879770758be40a48a5ba6b5bfc8206 /lib | |
parent | 61c134fa961a0aaa86be17d921dbe6727d0a7c1c (diff) | |
download | otp-2fb636273a06d31f0c24dcecf9302cd6561f02af.tar.gz otp-2fb636273a06d31f0c24dcecf9302cd6561f02af.tar.bz2 otp-2fb636273a06d31f0c24dcecf9302cd6561f02af.zip |
Some minor updates regarding how test data is generated.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ssh/test/Makefile | 2 | ||||
-rw-r--r-- | lib/ssh/test/ssh_basic_SUITE.erl | 1 | ||||
-rw-r--r-- | lib/ssh/test/ssh_sftp_SUITE.erl | 1 | ||||
-rw-r--r-- | lib/ssh/test/ssh_sftpd_SUITE.erl | 1 | ||||
-rw-r--r-- | lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl | 1 | ||||
-rw-r--r-- | lib/ssh/test/ssh_test_lib.erl | 4 | ||||
-rw-r--r-- | lib/ssh/test/ssh_to_openssh_SUITE.erl | 1 |
7 files changed, 10 insertions, 1 deletions
diff --git a/lib/ssh/test/Makefile b/lib/ssh/test/Makefile index c143181720..a3518aef52 100644 --- a/lib/ssh/test/Makefile +++ b/lib/ssh/test/Makefile @@ -45,7 +45,7 @@ HRL_FILES_NEEDED_IN_TEST= \ ERL_FILES= $(MODULES:%=%.erl) -KEY_FILES= ssh_host_dsa_key ssh_host_dsa_key.pub +KEY_FILES= ssh_host_dsa_key #ssh_host_dsa_key.pub TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR)) diff --git a/lib/ssh/test/ssh_basic_SUITE.erl b/lib/ssh/test/ssh_basic_SUITE.erl index f01b0a719e..c2d10b8266 100644 --- a/lib/ssh/test/ssh_basic_SUITE.erl +++ b/lib/ssh/test/ssh_basic_SUITE.erl @@ -44,6 +44,7 @@ init_per_suite(Config) -> Dir = ?config(priv_dir, Config), ssh_test_lib:save_known_hosts(Dir), {ok, _} = ssh_test_lib:get_id_keys(Dir), + ssh_test_lib:make_dsa_public_key_file(42, 43, 44, 45, Config), Config; _Else -> {skip, "Crypto could not be started!"} diff --git a/lib/ssh/test/ssh_sftp_SUITE.erl b/lib/ssh/test/ssh_sftp_SUITE.erl index 123a12773b..caaf4e6243 100644 --- a/lib/ssh/test/ssh_sftp_SUITE.erl +++ b/lib/ssh/test/ssh_sftp_SUITE.erl @@ -52,6 +52,7 @@ init_per_suite(Config) -> ssh_test_lib:save_known_hosts(Dir), %% More like copy_id_keys!!! {ok, _} = ssh_test_lib:get_id_keys(Dir), + ssh_test_lib:make_dsa_public_key_file(42, 43, 44, 45, Config), Config; {ok,_} -> {skip,"Could not start ssh!"}; diff --git a/lib/ssh/test/ssh_sftpd_SUITE.erl b/lib/ssh/test/ssh_sftpd_SUITE.erl index f5ed668fa6..97857c98d9 100644 --- a/lib/ssh/test/ssh_sftpd_SUITE.erl +++ b/lib/ssh/test/ssh_sftpd_SUITE.erl @@ -55,6 +55,7 @@ init_per_suite(Config) -> case {catch ssh:stop(),catch crypto:start()} of {ok,ok} -> + ssh_test_lib:make_dsa_public_key_file(42, 43, 44, 45, Config), Config; {ok,_} -> {skip,"Could not start ssh!"}; diff --git a/lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl b/lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl index db23a98225..c571ac45f7 100644 --- a/lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl +++ b/lib/ssh/test/ssh_sftpd_erlclient_SUITE.erl @@ -54,6 +54,7 @@ init_per_suite(Config) -> {ok, FileInfo} = file:read_file_info(FileName), ok = file:write_file_info(FileName, FileInfo#file_info{mode = 8#400}), + ssh_test_lib:make_dsa_public_key_file(42, 43, 44, 45, Config), Config; _Else -> {skip,"Could not start ssh!"} diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl index 8c9fb9038d..f2a6351f96 100644 --- a/lib/ssh/test/ssh_test_lib.erl +++ b/lib/ssh/test/ssh_test_lib.erl @@ -283,6 +283,10 @@ make_dsa_public_key_file(P, Q, G, Y, Config) -> FileName = filename:join([?config(data_dir, Config), "ssh_host_dsa_key.pub"]), file:write_file(FileName, <<"ssh-dss ", B64/binary>>). +make_dsa_private_key_file(LSize, NSize, Config) -> + {Key, EncodedKey} = gen_dsa(LSize, NSize), + FileName = filename:join([?config(data_dir, Config), "ssh_host_dsa_key"]), + file:write_file(FileName, EncodedKey). %%-------------------------------------------------------------------- %% Create and return a der encoded certificate diff --git a/lib/ssh/test/ssh_to_openssh_SUITE.erl b/lib/ssh/test/ssh_to_openssh_SUITE.erl index cf3279df75..c927dead04 100644 --- a/lib/ssh/test/ssh_to_openssh_SUITE.erl +++ b/lib/ssh/test/ssh_to_openssh_SUITE.erl @@ -42,6 +42,7 @@ init_per_suite(Config) -> case catch crypto:start() of ok -> + ssh_test_lib:make_dsa_public_key_file(42, 43, 44, 45, Config), Config; _Else -> {skip,"Could not start crypto!"} |