diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-06-18 06:33:43 +0200 |
---|---|---|
committer | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2020-06-22 16:39:26 +0200 |
commit | 7d40faca54e64e9c6efa48c6d11e46d3037121c4 (patch) | |
tree | d4cd9677cc01c9487458c33e61e0b92b488f0f34 /test/recipes/81-test_cmp_cli.t | |
parent | 11baa470a21b514ab247071e80273ddc0a80c504 (diff) | |
download | openssl-7d40faca54e64e9c6efa48c6d11e46d3037121c4.tar.gz |
81-test_cmp_cli.t: Do connections to 127.0.0.1 (e.g., Mock server) without proxy
Fixes #12156
Reviewed-by: Nicola Tuveri <nic.tuv@gmail.com>
(Merged from https://github.com/openssl/openssl/pull/12175)
Diffstat (limited to 'test/recipes/81-test_cmp_cli.t')
-rw-r--r-- | test/recipes/81-test_cmp_cli.t | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/test/recipes/81-test_cmp_cli.t b/test/recipes/81-test_cmp_cli.t index 3be02c6166..516aebc6ae 100644 --- a/test/recipes/81-test_cmp_cli.t +++ b/test/recipes/81-test_cmp_cli.t @@ -249,12 +249,22 @@ sub load_tests { $line =~ s{_PBM_PORT}{$pbm_port}g; $line =~ s{_PBM_REF}{$pbm_ref}g; $line =~ s{_PBM_SECRET}{$pbm_secret}g; - my $noproxy = $line =~ m/,\s*-no_proxy\s*,(.*?)(,|$)/ ? $1 : $no_proxy; - next LOOP if $no_proxy && ($noproxy =~ $server_host) - && $line =~ m/,\s*-proxy\s*,/; + next LOOP if $server_tls == 0 && $line =~ m/,\s*-tls_used\s*,/; - $line =~ s{-section,,}{-section,,-proxy,$proxy,} unless $line =~ m/,\s*-proxy\s*,/; + my $noproxy = $no_proxy; + if ($line =~ m/,\s*-no_proxy\s*,(.*?)(,|$)/) { + $noproxy = $1; + } elsif ($server_host eq "127.0.0.1") { + # do connections to localhost (e.g., Mock server) without proxy + $line =~ s{-section,,}{-section,,-no_proxy,127.0.0.1,} ; + } + if ($line =~ m/,\s*-proxy\s*,/) { + next LOOP if $no_proxy && ($noproxy =~ $server_host); + } else { + $line =~ s{-section,,}{-section,,-proxy,$proxy,}; + } $line =~ s{-section,,}{-config,../$test_config,-section,$server_name $aspect,}; + my @fields = grep /\S/, split ",", $line; s/^<EMPTY>$// for (@fields); # used for proxy="" s/^\s+// for (@fields); # remove leading whitespace from elements |