remove cacert.php.
authorx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 8 Jul 2006 14:44:24 +0000 (14:44 +0000)
committerx2000habouzit <x2000habouzit@839d8a87-29fc-0310-9880-83ba4fa771e5>
Sat, 8 Jul 2006 14:44:24 +0000 (14:44 +0000)
git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@391 839d8a87-29fc-0310-9880-83ba4fa771e5

htdocs/cacert.php [deleted file]
modules/core.php

diff --git a/htdocs/cacert.php b/htdocs/cacert.php
deleted file mode 100644 (file)
index a1160fa..0000000
+++ /dev/null
@@ -1,26 +0,0 @@
-<?php
-/***************************************************************************
- *  Copyright (C) 2003-2006 Polytechnique.org                              *
- *  http://opensource.polytechnique.org/                                   *
- *                                                                         *
- *  This program is free software; you can redistribute it and/or modify   *
- *  it under the terms of the GNU General Public License as published by   *
- *  the Free Software Foundation; either version 2 of the License, or      *
- *  (at your option) any later version.                                    *
- *                                                                         *
- *  This program is distributed in the hope that it will be useful,        *
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of         *
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the          *
- *  GNU General Public License for more details.                           *
- *                                                                         *
- *  You should have received a copy of the GNU General Public License      *
- *  along with this program; if not, write to the Free Software            *
- *  Foundation, Inc.,                                                      *
- *  59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                *
- ***************************************************************************/
-
-$data = file_get_contents("/etc/ssl/xorgCA/cacert.pem","r");
-Header("Content-Type: application/x-x509-ca-cert");
-Header("Content-Length: ".strlen($data));
-echo $data;
-?>
index a18d20c..367acfe 100644 (file)
@@ -24,9 +24,10 @@ class CoreModule extends PLModule
     function handlers()
     {
         return array(
-            '403'  => $this->make_hook('403', AUTH_PUBLIC),
-            '404'  => $this->make_hook('404', AUTH_PUBLIC),
-            'exit' => $this->make_hook('exit', AUTH_PUBLIC),
+            '403'         => $this->make_hook('403', AUTH_PUBLIC),
+            '404'         => $this->make_hook('404', AUTH_PUBLIC),
+            'exit'        => $this->make_hook('exit', AUTH_PUBLIC),
+            'cacert.pem'  => $this->make_hook('cacert', AUTH_PUBLIC),
             'purge_cache' => $this->make_hook('purge_cache', AUTH_COOKIE, 'admin')
         );
     }
@@ -40,6 +41,15 @@ class CoreModule extends PLModule
         return PL_OK;
     }
 
+    function handler_cacert(&$page)
+    {
+        $data = file_get_contents('/etc/ssl/xorgCA/cacert.pem');
+        header('Content-Type: application/x-x509-ca-cert');
+        header('Content-Length: '.strlen($data));
+        echo $data;
+        exit;
+    }
+
     function handler_exit(&$page, $level = null)
     {
         if (Session::has('suid')) {