File tree Expand file tree Collapse file tree 5 files changed +46
-12
lines changed
tests/acceptance/16_cf-serverd/serial Expand file tree Collapse file tree 5 files changed +46
-12
lines changed Original file line number Diff line number Diff line change 11body common control
22{
3- inputs => { "../../default.cf.sub", "../../run_with_server.cf.sub" };
3+ inputs => {
4+ "../../default.cf.sub",
5+ "../../run_with_server.cf.sub",
6+ "./render_single_cipher_server_config.cf.sub",
7+ };
48 bundlesequence => { default("$(this.promise_filename)") };
59 version => "1.0";
610}
711
12+ bundle agent init
13+ {
14+ methods:
15+ "render_single_cipher_server_config";
16+ }
17+
818bundle agent test
919{
1020 methods:
@@ -18,9 +28,9 @@ bundle agent test
1828
1929 "any" usebundle => generate_key;
2030
21- "any" usebundle => start_server("$(this.promise_dirname)/nondefault_ciphers_tlsversion .srv");
31+ "any" usebundle => start_server("$(this.promise_dirname)/single_cipher_tlsversion .srv");
2232 "any" usebundle => start_server("$(this.promise_dirname)/default_ciphers_tlsversion.srv");
2333 "any" usebundle => run_test("$(this.promise_filename).sub");
24- "any" usebundle => stop_server("$(this.promise_dirname)/nondefault_ciphers_tlsversion .srv");
34+ "any" usebundle => stop_server("$(this.promise_dirname)/single_cipher_tlsversion .srv");
2535 "any" usebundle => stop_server("$(this.promise_dirname)/default_ciphers_tlsversion.srv");
2636}
Original file line number Diff line number Diff line change @@ -16,11 +16,7 @@ body common control
1616
1717 # This cipher doesn't match neither of the two
1818 # servers "allowciphers" setting.
19- tls_ciphers => "AES128-SHA";
20- }
21-
22- bundle agent init
23- {
19+ tls_ciphers => "NOPE";
2420}
2521
2622bundle agent test
Original file line number Diff line number Diff line change 11body common control
22{
3- inputs => { "../../default.cf.sub", "../../run_with_server.cf.sub" };
3+ inputs => {
4+ "../../default.cf.sub",
5+ "../../run_with_server.cf.sub",
6+ "./render_single_cipher_server_config.cf.sub"
7+ };
48 bundlesequence => { default("$(this.promise_filename)") };
59 version => "1.0";
610}
711
12+ bundle agent init
13+ {
14+ methods:
15+ "render_single_cipher_server_config";
16+ }
17+
818bundle agent test
919{
1020 meta:
@@ -22,9 +32,9 @@ bundle agent test
2232
2333 "any" usebundle => generate_key;
2434
25- "any" usebundle => start_server("$(this.promise_dirname)/nondefault_ciphers_tlsversion .srv");
35+ "any" usebundle => start_server("$(this.promise_dirname)/single_cipher_tlsversion .srv");
2636 "any" usebundle => start_server("$(this.promise_dirname)/default_ciphers_tlsversion.srv");
2737 "any" usebundle => run_test("$(this.promise_filename).sub");
28- "any" usebundle => stop_server("$(this.promise_dirname)/nondefault_ciphers_tlsversion .srv");
38+ "any" usebundle => stop_server("$(this.promise_dirname)/single_cipher_tlsversion .srv");
2939 "any" usebundle => stop_server("$(this.promise_dirname)/default_ciphers_tlsversion.srv");
3040}
Original file line number Diff line number Diff line change 1+ bundle agent render_single_cipher_server_config
2+ {
3+ vars:
4+ "openssl_command" string => ifelse(
5+ fileexists("${sys.bindir}/openssl"),
6+ "${sys.bindir}/openssl",
7+ "openssl"),
8+ comment => "Use vendored openssl if present, otherwise whatever is in PATH.";
9+ "first_supported_cipher" string => execresult("openssl ciphers -s | cut -d: -f1", "useshell");
10+ "data" data => '{ "cipher": "${first_supported_cipher}" }';
11+
12+ files:
13+ "$(this.promise_dirname)/single_cipher_tlsversion.srv"
14+ create => "true",
15+ template_method => "mustache",
16+ edit_template => "$(this.promise_dirname)/single_cipher_tlsversion.srv.mustache",
17+ template_data => @(data);
18+ }
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ body server control
1515 port => " 9888" ;
1616
1717 # Only this cipher is to be accepted
18- allowciphers => "AES128-GCM-SHA256 ";
18+ allowciphers => " {{cipher}} " ;
1919
2020 # Allow only TLSv1.1 or higher
2121 allowtlsversion => " 1.1" ;
You can’t perform that action at this time.
0 commit comments