... | ... |
@@ -43,7 +43,7 @@ if ($mode == 'csr') { |
43 | 43 |
<textarea cols=\"70\" rows=\"20\"> |
44 | 44 |
{$cert} |
45 | 45 |
</textarea>"); |
46 |
- |
|
46 |
+ |
|
47 | 47 |
if (isset($_REQUEST['private']) && $_REQUEST['private'] == 'yes') { |
48 | 48 |
output("<h4>privater Schlüssel</h4> |
49 | 49 |
<textarea cols=\"70\" rows=\"20\"> |
... | ... |
@@ -71,7 +71,7 @@ if ($mode == 'csr') { |
71 | 71 |
<textarea cols=\"70\" rows=\"20\"> |
72 | 72 |
{$cert} |
73 | 73 |
</textarea>"); |
74 |
- |
|
74 |
+ |
|
75 | 75 |
if (isset($_REQUEST['private']) && $_REQUEST['private'] == 'yes') { |
76 | 76 |
output("<h4>privater Schlüssel</h4> |
77 | 77 |
<textarea cols=\"70\" rows=\"20\"> |
... | ... |
@@ -8,7 +8,7 @@ Written 2008-2018 by schokokeks.org Hosting, namely |
8 | 8 |
|
9 | 9 |
To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. |
10 | 10 |
|
11 |
-You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see |
|
11 |
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see |
|
12 | 12 |
http://creativecommons.org/publicdomain/zero/1.0/ |
13 | 13 |
|
14 | 14 |
Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code. |
... | ... |
@@ -18,91 +18,66 @@ require_once('certs.php'); |
18 | 18 |
require_role(ROLE_SYSTEMUSER); |
19 | 19 |
|
20 | 20 |
$mode = 'cert'; |
21 |
-if ($_REQUEST['mode'] == 'csr') |
|
22 |
- $mode = 'csr'; |
|
21 |
+if ($_REQUEST['mode'] == 'csr') { |
|
22 |
+ $mode = 'csr'; |
|
23 |
+} |
|
23 | 24 |
|
24 | 25 |
|
25 | 26 |
$section = 'vhosts_certs'; |
26 | 27 |
|
27 | 28 |
|
28 |
-if ($mode == 'csr') |
|
29 |
-{ |
|
30 |
- $data = csr_details($_REQUEST['id']); |
|
31 |
- $cert = $data['csr']; |
|
32 |
- $key = $data['key']; |
|
29 |
+if ($mode == 'csr') { |
|
30 |
+ $data = csr_details($_REQUEST['id']); |
|
31 |
+ $cert = $data['csr']; |
|
32 |
+ $key = $data['key']; |
|
33 | 33 |
|
34 | 34 |
|
35 |
- title('CSR anzeigen'); |
|
36 |
- output("<p>Untenstehend sehen Sie Ihren automatisch erzeugten CSR (»certificate signing request«) und evtl. |
|
35 |
+ title('CSR anzeigen'); |
|
36 |
+ output("<p>Untenstehend sehen Sie Ihren automatisch erzeugten CSR (»certificate signing request«) und evtl. |
|
37 | 37 |
den dazu gehörigen privaten Schlüssel. Sofern Sie den privaten Schlüssel auf Ihrer Festplatte |
38 | 38 |
speichern, stellen Sie bitte sicher, dass dieser vor unbefugtem Zugriff geschützt ist. Der |
39 | 39 |
private Schlüssel ist selbst <strong>nicht verschlüsselt</strong> und nicht mit einem |
40 | 40 |
Passwort geschützt.</p>"); |
41 | 41 |
|
42 |
- output("<h4>CSR</h4> |
|
42 |
+ output("<h4>CSR</h4> |
|
43 | 43 |
<textarea cols=\"70\" rows=\"20\"> |
44 | 44 |
{$cert} |
45 | 45 |
</textarea>"); |
46 | 46 |
|
47 |
- if (isset($_REQUEST['private']) && $_REQUEST['private'] == 'yes') |
|
48 |
- { |
|
49 |
- output("<h4>privater Schlüssel</h4> |
|
47 |
+ if (isset($_REQUEST['private']) && $_REQUEST['private'] == 'yes') { |
|
48 |
+ output("<h4>privater Schlüssel</h4> |
|
50 | 49 |
<textarea cols=\"70\" rows=\"20\"> |
51 | 50 |
{$key} |
52 | 51 |
</textarea>"); |
53 |
- } |
|
54 |
- else |
|
55 |
- { |
|
56 |
- output('<p>'.internal_link('', 'privaten Schlüssel auch anzeigen', "mode={$_REQUEST['mode']}&id={$_REQUEST['id']}&private=yes").'</p>'); |
|
57 |
- } |
|
58 |
- |
|
52 |
+ } else { |
|
53 |
+ output('<p>'.internal_link('', 'privaten Schlüssel auch anzeigen', "mode={$_REQUEST['mode']}&id={$_REQUEST['id']}&private=yes").'</p>'); |
|
54 |
+ } |
|
59 | 55 |
|
60 |
- addnew('certfromcsr', 'Unterschriebenes Zertifikat eingeben', "id={$_REQUEST['id']}"); |
|
61 | 56 |
|
57 |
+ addnew('certfromcsr', 'Unterschriebenes Zertifikat eingeben', "id={$_REQUEST['id']}"); |
|
58 |
+} else { |
|
59 |
+ $data = cert_details($_REQUEST['id']); |
|
60 |
+ $cert = $data['cert']; |
|
61 |
+ $key = $data['key']; |
|
62 | 62 |
|
63 |
-} |
|
64 |
-else |
|
65 |
-{ |
|
66 |
- $data = cert_details($_REQUEST['id']); |
|
67 |
- $cert = $data['cert']; |
|
68 |
- $key = $data['key']; |
|
69 |
- |
|
70 |
- title('Zertifikat anzeigen'); |
|
71 |
- output("<p>Untenstehend sehen Sie Ihr Zertifikat und evtl. den dazu gehörigen privaten |
|
63 |
+ title('Zertifikat anzeigen'); |
|
64 |
+ output("<p>Untenstehend sehen Sie Ihr Zertifikat und evtl. den dazu gehörigen privaten |
|
72 | 65 |
Schlüssel. Sofern Sie den privaten Schlüssel auf Ihrer Festplatte speichern, stellen |
73 | 66 |
Sie bitte sicher, dass dieser vor unbefugtem Zugriff geschützt ist. Der private |
74 | 67 |
Schlüssel ist selbst <strong>nicht verschlüsselt</strong> und nicht mit einem |
75 | 68 |
Passwort geschützt.</p>"); |
76 | 69 |
|
77 |
- output("<h4>Zertifikat</h4> |
|
70 |
+ output("<h4>Zertifikat</h4> |
|
78 | 71 |
<textarea cols=\"70\" rows=\"20\"> |
79 | 72 |
{$cert} |
80 | 73 |
</textarea>"); |
81 | 74 |
|
82 |
- if (isset($_REQUEST['private']) && $_REQUEST['private'] == 'yes') |
|
83 |
- { |
|
84 |
- output("<h4>privater Schlüssel</h4> |
|
75 |
+ if (isset($_REQUEST['private']) && $_REQUEST['private'] == 'yes') { |
|
76 |
+ output("<h4>privater Schlüssel</h4> |
|
85 | 77 |
<textarea cols=\"70\" rows=\"20\"> |
86 | 78 |
{$key} |
87 | 79 |
</textarea>"); |
88 |
- } |
|
89 |
- else |
|
90 |
- { |
|
91 |
- output('<p>'.internal_link('', 'privaten Schlüssel auch anzeigen', "mode={$_REQUEST['mode']}&id={$_REQUEST['id']}&private=yes").'</p>'); |
|
92 |
- } |
|
93 |
- |
|
94 |
- |
|
95 |
- |
|
96 |
- |
|
80 |
+ } else { |
|
81 |
+ output('<p>'.internal_link('', 'privaten Schlüssel auch anzeigen', "mode={$_REQUEST['mode']}&id={$_REQUEST['id']}&private=yes").'</p>'); |
|
82 |
+ } |
|
97 | 83 |
} |
98 |
- |
|
99 |
- |
|
100 |
- |
|
101 |
- |
|
102 |
- |
|
103 |
- |
|
104 |
- |
|
105 |
- |
|
106 |
- |
|
107 |
- |
|
108 |
- |
... | ... |
@@ -68,7 +68,7 @@ else |
68 | 68 |
$key = $data['key']; |
69 | 69 |
|
70 | 70 |
title('Zertifikat anzeigen'); |
71 |
- output("<p>Untenstehend sehen Sie Ihr SSL-Zertifikat und evtl. den dazu gehörigen privaten |
|
71 |
+ output("<p>Untenstehend sehen Sie Ihr Zertifikat und evtl. den dazu gehörigen privaten |
|
72 | 72 |
Schlüssel. Sofern Sie den privaten Schlüssel auf Ihrer Festplatte speichern, stellen |
73 | 73 |
Sie bitte sicher, dass dieser vor unbefugtem Zugriff geschützt ist. Der private |
74 | 74 |
Schlüssel ist selbst <strong>nicht verschlüsselt</strong> und nicht mit einem |
... | ... |
@@ -1,4 +1,18 @@ |
1 | 1 |
<?php |
2 |
+/* |
|
3 |
+This file belongs to the Webinterface of schokokeks.org Hosting |
|
4 |
+ |
|
5 |
+Written 2008-2012 by schokokeks.org Hosting, namely |
|
6 |
+ Bernd Wurst <bernd@schokokeks.org> |
|
7 |
+ Hanno Böck <hanno@schokokeks.org> |
|
8 |
+ |
|
9 |
+To the extent possible under law, the author(s) have dedicated all copyright and related and neighboring rights to this software to the public domain worldwide. This software is distributed without any warranty. |
|
10 |
+ |
|
11 |
+You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see |
|
12 |
+http://creativecommons.org/publicdomain/zero/1.0/ |
|
13 |
+ |
|
14 |
+Nevertheless, in case you use a significant part of this code, we ask (but not require, see the license) that you keep the authors' names in place and return your changes to the public. We would be especially happy if you tell us what you're going to do with this code. |
|
15 |
+*/ |
|
2 | 16 |
|
3 | 17 |
require_once('certs.php'); |
4 | 18 |
require_role(ROLE_SYSTEMUSER); |
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1812 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -18,9 +18,8 @@ if ($mode == 'csr') |
18 | 18 |
$key = $data['key']; |
19 | 19 |
|
20 | 20 |
|
21 |
- $title = 'CSR anzeigen'; |
|
22 |
- output("<h3>CSR anzeigen</h3> |
|
23 |
- <p>Untenstehend sehen Sie Ihren automatisch erzeugten CSR (»certificate signing request«) und evtl. |
|
21 |
+ title('CSR anzeigen'); |
|
22 |
+ output("<p>Untenstehend sehen Sie Ihren automatisch erzeugten CSR (»certificate signing request«) und evtl. |
|
24 | 23 |
den dazu gehörigen privaten Schlüssel. Sofern Sie den privaten Schlüssel auf Ihrer Festplatte |
25 | 24 |
speichern, stellen Sie bitte sicher, dass dieser vor unbefugtem Zugriff geschützt ist. Der |
26 | 25 |
private Schlüssel ist selbst <strong>nicht verschlüsselt</strong> und nicht mit einem |
... | ... |
@@ -54,9 +53,8 @@ else |
54 | 53 |
$cert = $data['cert']; |
55 | 54 |
$key = $data['key']; |
56 | 55 |
|
57 |
- $title = 'Zertifikat anzeigen'; |
|
58 |
- output("<h3>Zertifikat anzeigen</h3> |
|
59 |
- <p>Untenstehend sehen Sie Ihr SSL-Zertifikat und evtl. den dazu gehörigen privaten |
|
56 |
+ title('Zertifikat anzeigen'); |
|
57 |
+ output("<p>Untenstehend sehen Sie Ihr SSL-Zertifikat und evtl. den dazu gehörigen privaten |
|
60 | 58 |
Schlüssel. Sofern Sie den privaten Schlüssel auf Ihrer Festplatte speichern, stellen |
61 | 59 |
Sie bitte sicher, dass dieser vor unbefugtem Zugriff geschützt ist. Der private |
62 | 60 |
Schlüssel ist selbst <strong>nicht verschlüsselt</strong> und nicht mit einem |
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1675 87cf0b9e-d624-0410-a070-f6ee81989793
... | ... |
@@ -27,16 +27,16 @@ if ($mode == 'csr') |
27 | 27 |
Passwort geschützt.</p>"); |
28 | 28 |
|
29 | 29 |
output("<h4>CSR</h4> |
30 |
- <pre> |
|
30 |
+ <textarea cols=\"70\" rows=\"20\"> |
|
31 | 31 |
{$cert} |
32 |
-</pre>"); |
|
32 |
+</textarea>"); |
|
33 | 33 |
|
34 | 34 |
if (isset($_REQUEST['private']) && $_REQUEST['private'] == 'yes') |
35 | 35 |
{ |
36 | 36 |
output("<h4>privater Schlüssel</h4> |
37 |
-<pre> |
|
37 |
+<textarea cols=\"70\" rows=\"20\"> |
|
38 | 38 |
{$key} |
39 |
-</pre>"); |
|
39 |
+</textarea>"); |
|
40 | 40 |
} |
41 | 41 |
else |
42 | 42 |
{ |
... | ... |
@@ -63,16 +63,16 @@ else |
63 | 63 |
Passwort geschützt.</p>"); |
64 | 64 |
|
65 | 65 |
output("<h4>Zertifikat</h4> |
66 |
- <pre> |
|
66 |
+ <textarea cols=\"70\" rows=\"20\"> |
|
67 | 67 |
{$cert} |
68 |
-</pre>"); |
|
68 |
+</textarea>"); |
|
69 | 69 |
|
70 |
- if ($_REQUEST['private'] == 'yes') |
|
70 |
+ if (isset($_REQUEST['private']) && $_REQUEST['private'] == 'yes') |
|
71 | 71 |
{ |
72 | 72 |
output("<h4>privater Schlüssel</h4> |
73 |
-<pre> |
|
73 |
+<textarea cols=\"70\" rows=\"20\"> |
|
74 | 74 |
{$key} |
75 |
-</pre>"); |
|
75 |
+</textarea>"); |
|
76 | 76 |
} |
77 | 77 |
else |
78 | 78 |
{ |
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1445 87cf0b9e-d624-0410-a070-f6ee81989793
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1424 87cf0b9e-d624-0410-a070-f6ee81989793
git-svn-id: https://svn.schokokeks.org/repos/tools/webinterface/trunk@1422 87cf0b9e-d624-0410-a070-f6ee81989793
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,96 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+require_once('certs.php'); |
|
4 |
+require_role(ROLE_SYSTEMUSER); |
|
5 |
+ |
|
6 |
+$mode = 'cert'; |
|
7 |
+if ($_REQUEST['mode'] == 'csr') |
|
8 |
+ $mode = 'csr'; |
|
9 |
+ |
|
10 |
+ |
|
11 |
+$section = 'vhosts_certs'; |
|
12 |
+ |
|
13 |
+ |
|
14 |
+if ($mode == 'csr') |
|
15 |
+{ |
|
16 |
+ $data = csr_details($_REQUEST['id']); |
|
17 |
+ $cert = $data['csr']; |
|
18 |
+ $key = $data['key']; |
|
19 |
+ |
|
20 |
+ |
|
21 |
+ $title = 'CSR anzeigen'; |
|
22 |
+ output("<h3>CSR anzeigen</h3> |
|
23 |
+ <p>Untenstehend sehen Sie Ihren automatisch erzeugten CSR (»certificate signing request«) und evtl. |
|
24 |
+ den dazu gehörigen privaten Schlüssel. Sofern Sie den privaten Schlüssel auf Ihrer Festplatte |
|
25 |
+ speichern, stellen Sie bitte sicher, dass dieser vor unbefugtem Zugriff geschützt ist. Der |
|
26 |
+ private Schlüssel ist selbst <strong>nicht verschlüsselt</strong> und nicht mit einem |
|
27 |
+ Passwort geschützt.</p>"); |
|
28 |
+ |
|
29 |
+ output("<h4>CSR</h4> |
|
30 |
+ <pre> |
|
31 |
+{$cert} |
|
32 |
+</pre>"); |
|
33 |
+ |
|
34 |
+ if ($_REQUEST['private'] == 'yes') |
|
35 |
+ { |
|
36 |
+ output("<h4>privater Schlüssel</h4> |
|
37 |
+<pre> |
|
38 |
+{$key} |
|
39 |
+</pre>"); |
|
40 |
+ } |
|
41 |
+ else |
|
42 |
+ { |
|
43 |
+ output('<p>'.internal_link('', 'privaten Schlüssel auch anzeigen', "mode={$_REQUEST['mode']}&id={$_REQUEST['id']}&private=yes").'</p>'); |
|
44 |
+ } |
|
45 |
+ |
|
46 |
+ |
|
47 |
+ output('<p>'.internal_link('certfromcsr', 'Unterschriebenes Zertifikat eingeben', "id={$_REQUEST['id']}").'</p>'); |
|
48 |
+ |
|
49 |
+ |
|
50 |
+} |
|
51 |
+else |
|
52 |
+{ |
|
53 |
+ $data = cert_details($_REQUEST['id']); |
|
54 |
+ $cert = $data['cert']; |
|
55 |
+ $key = $data['key']; |
|
56 |
+ |
|
57 |
+ $title = 'Zertifikat anzeigen'; |
|
58 |
+ output("<h3>Zertifikat anzeigen</h3> |
|
59 |
+ <p>Untenstehend sehen Sie Ihr SSL-Zertifikat und evtl. den dazu gehörigen privaten |
|
60 |
+ Schlüssel. Sofern Sie den privaten Schlüssel auf Ihrer Festplatte speichern, stellen |
|
61 |
+ Sie bitte sicher, dass dieser vor unbefugtem Zugriff geschützt ist. Der private |
|
62 |
+ Schlüssel ist selbst <strong>nicht verschlüsselt</strong> und nicht mit einem |
|
63 |
+ Passwort geschützt.</p>"); |
|
64 |
+ |
|
65 |
+ output("<h4>Zertifikat</h4> |
|
66 |
+ <pre> |
|
67 |
+{$cert} |
|
68 |
+</pre>"); |
|
69 |
+ |
|
70 |
+ if ($_REQUEST['private'] == 'yes') |
|
71 |
+ { |
|
72 |
+ output("<h4>privater Schlüssel</h4> |
|
73 |
+<pre> |
|
74 |
+{$key} |
|
75 |
+</pre>"); |
|
76 |
+ } |
|
77 |
+ else |
|
78 |
+ { |
|
79 |
+ output('<p>'.internal_link('', 'privaten Schlüssel auch anzeigen', "mode={$_REQUEST['mode']}&id={$_REQUEST['id']}&private=yes").'</p>'); |
|
80 |
+ } |
|
81 |
+ |
|
82 |
+ |
|
83 |
+ |
|
84 |
+ |
|
85 |
+} |
|
86 |
+ |
|
87 |
+ |
|
88 |
+ |
|
89 |
+ |
|
90 |
+ |
|
91 |
+ |
|
92 |
+ |
|
93 |
+ |
|
94 |
+ |
|
95 |
+ |
|
96 |
+ |