perl-test-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rj...@apache.org
Subject svn commit: r1844396 - /perl/Apache-Test/trunk/lib/Apache/TestRequest.pm
Date Sat, 20 Oct 2018 07:48:03 GMT
Author: rjung
Date: Sat Oct 20 07:48:03 2018
New Revision: 1844396

URL: http://svn.apache.org/viewvc?rev=1844396&view=rev
Log:
Allow to set CA file for raw TLS socket.

Old Net::SSL did not verify peer certs by
default, IO::Socket::SSL does verify them
by default.

Modified:
    perl/Apache-Test/trunk/lib/Apache/TestRequest.pm

Modified: perl/Apache-Test/trunk/lib/Apache/TestRequest.pm
URL: http://svn.apache.org/viewvc/perl/Apache-Test/trunk/lib/Apache/TestRequest.pm?rev=1844396&r1=1844395&r2=1844396&view=diff
==============================================================================
--- perl/Apache-Test/trunk/lib/Apache/TestRequest.pm (original)
+++ perl/Apache-Test/trunk/lib/Apache/TestRequest.pm Sat Oct 20 07:48:03 2018
@@ -656,6 +656,15 @@ sub set_client_cert {
     }
 }
 
+# Only for IO::Socket:SSL raw socket compatibility,
+# when using user_agent() already done in its
+# constructor.
+sub set_ca_cert {
+    my $vars = Apache::Test::vars();
+    my $cafile = "$vars->{sslca}/$vars->{sslcaorg}/certs/ca.crt";
+    $conn_opts->{SSL_ca_file} = $cafile;
+}
+
 #want news: urls to work with the LWP shortcuts
 #but cant find a clean way to override the default nntp port
 #by brute force we trick Net::NTTP into calling FixupNNTP::new



Mime
View raw message