1e1051a39Sopenharmony_ci[{-$testname-}]
2e1051a39Sopenharmony_cissl_conf = {-$testname-}-ssl
3e1051a39Sopenharmony_ci
4e1051a39Sopenharmony_ci[{-$testname-}-ssl]
5e1051a39Sopenharmony_ciserver = {-$testname-}-server
6e1051a39Sopenharmony_ciclient = {-$testname-}-client{-
7e1051a39Sopenharmony_ci    # The following sections are optional.
8e1051a39Sopenharmony_ci    $OUT = "";
9e1051a39Sopenharmony_ci    if (%server2) {
10e1051a39Sopenharmony_ci        $OUT .= "\nserver2 = $testname-server2";
11e1051a39Sopenharmony_ci    } elsif ($reuse_server2) {
12e1051a39Sopenharmony_ci        $OUT .= "\nserver2 = $testname-server";
13e1051a39Sopenharmony_ci    }
14e1051a39Sopenharmony_ci    if (%resume_server) {
15e1051a39Sopenharmony_ci        $OUT .= "\nresume-server = $testname-resume-server";
16e1051a39Sopenharmony_ci    } elsif ($reuse_resume_server) {
17e1051a39Sopenharmony_ci        $OUT .= "\nresume-server = $testname-server";
18e1051a39Sopenharmony_ci    }
19e1051a39Sopenharmony_ci    if (%resume_client) {
20e1051a39Sopenharmony_ci        $OUT .= "\nresume-client = $testname-resume-client";
21e1051a39Sopenharmony_ci    } elsif ($reuse_resume_client) {
22e1051a39Sopenharmony_ci        $OUT .= "\nresume-client = $testname-client";
23e1051a39Sopenharmony_ci    }
24e1051a39Sopenharmony_ci-}
25e1051a39Sopenharmony_ci
26e1051a39Sopenharmony_ci[{-$testname-}-server]
27e1051a39Sopenharmony_ci{-
28e1051a39Sopenharmony_ci    foreach my $key (sort keys %server) {
29e1051a39Sopenharmony_ci        # Emitted in the test section.
30e1051a39Sopenharmony_ci        next if ($key eq "extra");
31e1051a39Sopenharmony_ci        $OUT .= qq{$key} . " = " . qq{$server{$key}\n} if defined $server{$key};
32e1051a39Sopenharmony_ci    }
33e1051a39Sopenharmony_ci    if (%server2) {
34e1051a39Sopenharmony_ci        $OUT .= "\n[$testname-server2]\n";
35e1051a39Sopenharmony_ci        foreach my $key (sort keys %server2) {
36e1051a39Sopenharmony_ci            next if ($key eq "extra");
37e1051a39Sopenharmony_ci            $OUT .= qq{$key} . " = " . qq{$server2{$key}\n} if defined $server2{$key};
38e1051a39Sopenharmony_ci        }
39e1051a39Sopenharmony_ci    }
40e1051a39Sopenharmony_ci    if (%resume_server) {
41e1051a39Sopenharmony_ci        $OUT .= "\n[$testname-resume-server]\n";
42e1051a39Sopenharmony_ci        foreach my $key (sort keys %resume_server) {
43e1051a39Sopenharmony_ci            next if ($key eq "extra");
44e1051a39Sopenharmony_ci            $OUT .= qq{$key} . " = " . qq{$resume_server{$key}\n} if defined $resume_server{$key};
45e1051a39Sopenharmony_ci        }
46e1051a39Sopenharmony_ci    }
47e1051a39Sopenharmony_ci-}
48e1051a39Sopenharmony_ci[{-$testname-}-client]
49e1051a39Sopenharmony_ci{-
50e1051a39Sopenharmony_ci    foreach my $key (sort keys %client) {
51e1051a39Sopenharmony_ci        next if ($key eq "extra");
52e1051a39Sopenharmony_ci        $OUT .= qq{$key} . " = " . qq{$client{$key}\n} if defined $client{$key};
53e1051a39Sopenharmony_ci    }
54e1051a39Sopenharmony_ci    if (%resume_client) {
55e1051a39Sopenharmony_ci        $OUT .= "\n[$testname-resume-client]\n";
56e1051a39Sopenharmony_ci        foreach my $key (sort keys %resume_client) {
57e1051a39Sopenharmony_ci	    next if ($key eq "extra");
58e1051a39Sopenharmony_ci            $OUT .= qq{$key} . " = " . qq{$resume_client{$key}\n} if defined $resume_client{$key};
59e1051a39Sopenharmony_ci        }
60e1051a39Sopenharmony_ci    }
61e1051a39Sopenharmony_ci-}
62e1051a39Sopenharmony_ci[test-{-$idx-}]
63e1051a39Sopenharmony_ci{-
64e1051a39Sopenharmony_ci    foreach my $key (sort keys %test) {
65e1051a39Sopenharmony_ci        $OUT .= qq{$key} ." = " . qq{$test{$key}\n} if defined $test{$key};
66e1051a39Sopenharmony_ci    }
67e1051a39Sopenharmony_ci
68e1051a39Sopenharmony_ci    # The extra server/client configuration sections.
69e1051a39Sopenharmony_ci    if ($server{"extra"}) {
70e1051a39Sopenharmony_ci       $OUT .= "server = $testname-server-extra\n";
71e1051a39Sopenharmony_ci    }
72e1051a39Sopenharmony_ci    if (%server2 && $server2{"extra"}) {
73e1051a39Sopenharmony_ci       $OUT .= "server2 = $testname-server2-extra\n";
74e1051a39Sopenharmony_ci    } elsif ($reuse_server2 && $server{"extra"}) {
75e1051a39Sopenharmony_ci       $OUT .= "server2 = $testname-server-extra\n";
76e1051a39Sopenharmony_ci    }
77e1051a39Sopenharmony_ci    if (%resume_server && $resume_server{"extra"}) {
78e1051a39Sopenharmony_ci       $OUT .= "resume-server = $testname-resume-server-extra\n";
79e1051a39Sopenharmony_ci    } elsif ($reuse_resume_server && $server{"extra"}) {
80e1051a39Sopenharmony_ci       $OUT .= "resume-server = $testname-server-extra\n";
81e1051a39Sopenharmony_ci    }
82e1051a39Sopenharmony_ci    if ($client{"extra"}) {
83e1051a39Sopenharmony_ci       $OUT .= "client = $testname-client-extra\n";
84e1051a39Sopenharmony_ci    }
85e1051a39Sopenharmony_ci    if (%resume_client && $resume_client{"extra"}) {
86e1051a39Sopenharmony_ci       $OUT .= "resume-client = $testname-resume-client-extra\n";
87e1051a39Sopenharmony_ci    } elsif ($reuse_resume_client && $client{"extra"}) {
88e1051a39Sopenharmony_ci       $OUT .= "resume-client = $testname-client-extra\n";
89e1051a39Sopenharmony_ci    }
90e1051a39Sopenharmony_ci
91e1051a39Sopenharmony_ci    if ($server{"extra"}) {
92e1051a39Sopenharmony_ci        $OUT .= "\n[$testname-server-extra]\n";
93e1051a39Sopenharmony_ci        foreach my $key (sort keys %{$server{"extra"}}) {
94e1051a39Sopenharmony_ci            $OUT .= qq{$key} . " = " . qq{$server{"extra"}{$key}\n}
95e1051a39Sopenharmony_ci	    	 if defined $server{"extra"}{$key};
96e1051a39Sopenharmony_ci        }
97e1051a39Sopenharmony_ci    }
98e1051a39Sopenharmony_ci    if (%server2 && $server2{"extra"}) {
99e1051a39Sopenharmony_ci        $OUT .= "\n[$testname-server2-extra]\n";
100e1051a39Sopenharmony_ci        foreach my $key (sort keys %{$server2{"extra"}}) {
101e1051a39Sopenharmony_ci            $OUT .= qq{$key} . " = " . qq{$server2{"extra"}{$key}\n}
102e1051a39Sopenharmony_ci	    	 if defined $server2{"extra"}{$key};
103e1051a39Sopenharmony_ci        }
104e1051a39Sopenharmony_ci    }
105e1051a39Sopenharmony_ci   if (%resume_server && $resume_server{"extra"}) {
106e1051a39Sopenharmony_ci        $OUT .= "\n[$testname-resume-server-extra]\n";
107e1051a39Sopenharmony_ci        foreach my $key (sort keys %{$resume_server{"extra"}}) {
108e1051a39Sopenharmony_ci            $OUT .= qq{$key} . " = " . qq{$resume_server{"extra"}{$key}\n}
109e1051a39Sopenharmony_ci	    	 if defined $resume_server{"extra"}{$key};
110e1051a39Sopenharmony_ci        }
111e1051a39Sopenharmony_ci    }
112e1051a39Sopenharmony_ci   if ($client{"extra"}) {
113e1051a39Sopenharmony_ci        $OUT .= "\n[$testname-client-extra]\n";
114e1051a39Sopenharmony_ci        foreach my $key (sort keys %{$client{"extra"}}) {
115e1051a39Sopenharmony_ci            $OUT .= qq{$key} . " = " . qq{$client{"extra"}{$key}\n}
116e1051a39Sopenharmony_ci	    	 if defined $client{"extra"}{$key};
117e1051a39Sopenharmony_ci        }
118e1051a39Sopenharmony_ci   }
119e1051a39Sopenharmony_ci   if (%resume_client && $resume_client{"extra"}) {
120e1051a39Sopenharmony_ci        $OUT .= "\n[$testname-resume-client-extra]\n";
121e1051a39Sopenharmony_ci        foreach my $key (sort keys %{$resume_client{"extra"}}) {
122e1051a39Sopenharmony_ci            $OUT .= qq{$key} . " = " . qq{$resume_client{"extra"}{$key}\n}
123e1051a39Sopenharmony_ci	    	 if defined $resume_client{"extra"}{$key};
124e1051a39Sopenharmony_ci        }
125e1051a39Sopenharmony_ci    }
126e1051a39Sopenharmony_ci-}
127