mirror of
https://github.com/curl/curl.git
synced 2026-08-24 18:33:34 +03:00
- Peter Sylvester made the HTTPS test server use specific certificates for
each test, so that the test suite can now be used to actually test the verification of cert names etc. This made an error show up in the OpenSSL- specific code where it would attempt to match the CN field even if a subjectAltName exists that doesn't match. This is now fixed and verified in test 311.
This commit is contained in:
parent
a9caeb1064
commit
e73fe837a8
40 changed files with 1339 additions and 6 deletions
|
|
@ -28,6 +28,8 @@ my $srcdir=$path;
|
|||
|
||||
my $proto='https';
|
||||
|
||||
my $stuncert;
|
||||
|
||||
while(@ARGV) {
|
||||
if($ARGV[0] eq "-v") {
|
||||
$verbose=1;
|
||||
|
|
@ -51,6 +53,10 @@ while(@ARGV) {
|
|||
$srcdir=$ARGV[1];
|
||||
shift @ARGV;
|
||||
}
|
||||
elsif($ARGV[0] eq "-c") {
|
||||
$stuncert=$ARGV[1];
|
||||
shift @ARGV;
|
||||
}
|
||||
elsif($ARGV[0] =~ /^(\d+)$/) {
|
||||
$port = $1;
|
||||
}
|
||||
|
|
@ -58,7 +64,9 @@ while(@ARGV) {
|
|||
};
|
||||
|
||||
my $conffile="$path/stunnel.conf"; # stunnel configuration data
|
||||
my $certfile="$srcdir/stunnel.pem"; # stunnel server certificate
|
||||
my $certfile="$srcdir/"
|
||||
. ($stuncert?"certs/$stuncert":"stunnel.pem"); # stunnel server certificate
|
||||
|
||||
my $pidfile="$path/.$proto.pid"; # stunnel process pid file
|
||||
|
||||
# find out version info for the given stunnel binary
|
||||
|
|
@ -107,6 +115,19 @@ else {
|
|||
|
||||
if($verbose) {
|
||||
print uc($proto)." server: $cmd\n";
|
||||
|
||||
print "
|
||||
CApath = $path
|
||||
cert = $certfile
|
||||
pid = $pidfile
|
||||
debug = 0
|
||||
output = /dev/null
|
||||
foreground = yes
|
||||
|
||||
[curltest]
|
||||
accept = $port
|
||||
connect = $target_port
|
||||
";
|
||||
}
|
||||
|
||||
my $rc = system($cmd);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue