disable ssl verification when validating linkback request
authorChristian Weiske <cweiske@cweiske.de>
Wed, 26 Mar 2014 22:40:45 +0000 (23:40 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Wed, 26 Mar 2014 22:40:45 +0000 (23:40 +0100)
www/xmlrpc.php

index 4b7ce04..5a56488 100644 (file)
@@ -6,7 +6,20 @@ namespace stapibas;
 require_once 'www-header.php';
 
 $s = new \PEAR2\Services\Linkback\Server();
-$s->addCallback(new Linkback_DbStorage($db));
-$s->addCallback(new Linkback_Mailer());
+
+$fs = new \PEAR2\Services\Linkback\Server\Callback\FetchSource();
+$fs->getRequest()->setConfig(
+    array(
+        'ssl_verify_peer' => false,
+        'ssl_verify_host' => false
+    )
+);
+$callbacks = array(
+    $fs,
+    new \PEAR2\Services\Linkback\Server\Callback\LinkExists(),
+    new Linkback_DbStorage($db),
+    new Linkback_Mailer()
+);
+$s->setCallbacks($callbacks);
 $s->run();
 ?>