Project

General

Profile

Download (3.92 KB) Statistics
| Branch: | Tag: | Revision:
1 e2411886 Scott Ullrich
<?php
2
/*
3
	vpn_ipsec_ca.php
4
	part of m0n0wall (http://m0n0.ch/wall)
5
	
6
	Copyright (C) 2003-2005 Manuel Kasper <mk@neon1.net>.
7
	All rights reserved.
8
	
9
	Redistribution and use in source and binary forms, with or without
10
	modification, are permitted provided that the following conditions are met:
11
	
12
	1. Redistributions of source code must retain the above copyright notice,
13
	   this list of conditions and the following disclaimer.
14
	
15
	2. Redistributions in binary form must reproduce the above copyright
16
	   notice, this list of conditions and the following disclaimer in the
17
	   documentation and/or other materials provided with the distribution.
18
	
19
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
20
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
21
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
22
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
23
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28
	POSSIBILITY OF SUCH DAMAGE.
29
*/
30
31
require("guiconfig.inc");
32
33
if (!is_array($config['ipsec']['cacert'])) {
34
	$config['ipsec']['cacert'] = array();
35
}
36
ipsec_ca_sort();
37
$a_secret = &$config['ipsec']['cacert'];
38
39
if ($_GET['act'] == "del") {
40
	if ($a_secret[$_GET['id']]) {
41
		unset($a_secret[$_GET['id']]);
42
		write_config();
43
		touch($d_ipsecconfdirty_path);
44
		header("Location: vpn_ipsec_ca.php");
45
		exit;
46
	}
47
}
48
49 b128368a Bill Marquette
$pgtitle = "VPN: IPsec: Certificate Authority";
50 4df96eff Scott Ullrich
include("head.inc");
51
52 e2411886 Scott Ullrich
?>
53 4df96eff Scott Ullrich
54 422f27c0 Scott Ullrich
55
<body link="#0000CC" vlink="#0000CC" alink="#0000CC">
56 e2411886 Scott Ullrich
<?php include("fbegin.inc"); ?>
57 b128368a Bill Marquette
<p class="pgtitle"><?=$pgtitle?></p>
58 e2411886 Scott Ullrich
<form action="vpn_ipsec.php" method="post">
59
<?php if ($savemsg) print_info_box($savemsg); ?>
60
<?php if (file_exists($d_ipsecconfdirty_path)): ?><p>
61
<?php print_info_box_np("The IPsec tunnel configuration has been changed.<br>You must apply the changes in order for them to take effect.");?><br>
62
<?php endif; ?>
63
<table width="100%" border="0" cellpadding="0" cellspacing="0">
64
  <tr><td>
65 323d040b Scott Ullrich
<?php
66
	$tab_array = array();
67
	$tab_array[0] = array("Tunnels", false, "vpn_ipsec.php");
68
	$tab_array[1] = array("Mobile clients", false, "vpn_ipsec_mobile.php");
69
	$tab_array[2] = array("Pre-shared keys", false, "vpn_ipsec_keys.php");
70
	$tab_array[3] = array("CAs", true, "vpn_ipsec_ca.php");
71
	display_top_tabs($tab_array);
72
?>
73 e2411886 Scott Ullrich
  </td></tr>
74
  <tr> 
75 0f10aee4 Bill Marquette
    <td>
76
       <div id="mainarea">
77
              <table class="tabcont" width="100%" border="0" cellpadding="6" cellspacing="0">
78 e2411886 Scott Ullrich
                <tr> 
79
                  <td class="listhdrr">Identifier</td>
80
                  <td class="list"></td>
81
				</tr>
82
			  <?php $i = 0; foreach ($a_secret as $secretent): ?>
83
                <tr> 
84
                  <td class="listlr">
85
                    <?=htmlspecialchars($secretent['ident']);?>
86
                  </td>
87 677c0869 Erik Kristensen
                  <td class="list" nowrap> <a href="vpn_ipsec_ca_edit.php?id=<?=$i;?>"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_e.gif" title="edit certificate" width="17" height="17" border="0"></a>
88
                     &nbsp;<a href="vpn_ipsec_ca.php?act=del&id=<?=$i;?>" onclick="return confirm('Do you really want to delete this certificate?')"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_x.gif" title="delete certificate" width="17" height="17" border="0"></a></td>
89 e2411886 Scott Ullrich
				</tr>
90
			  <?php $i++; endforeach; ?>
91
                <tr> 
92
                  <td class="list"></td>
93 677c0869 Erik Kristensen
                  <td class="list"> <a href="vpn_ipsec_ca_edit.php"><img src="./themes/<?= $g['theme']; ?>/images/icons/icon_plus.gif" width="17" height="17" border="0"></a></td>
94 e2411886 Scott Ullrich
				</tr>
95
              </table>
96 0f10aee4 Bill Marquette
	</div>
97
    </td>
98
  </tr>
99
</table>
100 e2411886 Scott Ullrich
</form>
101
<?php include("fend.inc"); ?>
102 323d040b Scott Ullrich
</body>
103
</html>