[Pkg-owncloud-commits] [owncloud-client] 206/219: tx.pl: Set the SSL relaxing env variable.

Sandro Knauß hefee-guest at moszumanska.debian.org
Sat Oct 11 14:43:27 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 6c2ce06fead3c36d7d1f8e057d08b35da5c8bc6f
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Fri Oct 3 10:33:25 2014 +0200

    tx.pl: Set the SSL relaxing env variable.
---
 csync/tests/ownCloud/ownCloud/Test.pm | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/csync/tests/ownCloud/ownCloud/Test.pm b/csync/tests/ownCloud/ownCloud/Test.pm
index f93d3c3..180607e 100644
--- a/csync/tests/ownCloud/ownCloud/Test.pm
+++ b/csync/tests/ownCloud/ownCloud/Test.pm
@@ -115,6 +115,8 @@ sub initTesting(;$)
 
   $owncloud .= "/" unless( $owncloud =~ /\/$/ );
 
+  $ENV{PERL_LWP_SSL_VERIFY_HOSTNAME} = 0;
+
   print "Connecting to ownCloud at ". $owncloud ."\n";
 
   # For SSL set the environment variable needed by the LWP module for SSL
@@ -166,7 +168,9 @@ sub testDirUrl()
 # the global var $remoteDir;
 sub initRemoteDir
 {
-  $d->open( $owncloud );
+  $d->open( $owncloud )
+       or die("Couldn't open $owncloud: " .$d->message . "\n");
+
   my $url = testDirUrl();
 
   my $re = $d->mkcol( $url );
@@ -545,7 +549,7 @@ sub putToDirLWP($$)
     my $string = <FILE>;
     close FILE;
 
-    my $ua  = LWP::UserAgent->new();
+    my $ua  = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0 });
     $ua->agent( "ownCloudTest_$localDir");
     my $req = PUT $puturl, Content_Type => 'application/octet-stream',
 		  Content => $string;
@@ -579,7 +583,7 @@ sub getToFileLWP( $$ )
     my $geturl = testDirUrl() . $file;
     print "GETting $geturl to $localFile\n";
 
-    my $ua  = LWP::UserAgent->new();
+    my $ua  = LWP::UserAgent->new( ssl_opts => { verify_hostname => 0 });
     $ua->agent( "ownCloudTest_$localDir");
     $ua->credentials( server(), "foo", $user, $passwd);
     my $req = $ua->get($geturl, ":content_file" => $localFile);
@@ -721,7 +725,7 @@ sub createShare($$)
 
     }
 
-    my $ua  = LWP::UserAgent->new();
+    my $ua  = LWP::UserAgent->new(ssl_opts => { verify_hostname => 0 } );
     $ua->agent( "ownCloudTest_sharing");
     # http://localhost/ocm/ocs/v1.php/apps/files_sharing/api/v1/shares
     my $puturl = $ocs_url . "apps/files_sharing/api/v1/shares";
@@ -757,7 +761,7 @@ sub removeShare($$)
 		      -pass => $share_passwd );
     $dd->open( $owncloud);
 
-    my $ua  = LWP::UserAgent->new();
+    my $ua  = LWP::UserAgent->new(ssl_opts => { verify_hostname => 0 });
     $ua->agent( "ownCloudTest_sharing");
     # http://localhost/ocm/ocs/v1.php/apps/files_sharing/api/v1/shares
     my $url = $ocs_url . "apps/files_sharing/api/v1/shares/" . $shareId;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list