Neue Zertifikatsverwaltung
bernd authored 14 years ago
|
1) <?php
|
Added license tags for CC0,...
Bernd Wurst authored 12 years ago
|
2) /*
3) This file belongs to the Webinterface of schokokeks.org Hosting
4)
|
Updated copyright notice (2...
Bernd Wurst authored 11 years ago
|
5) Written 2008-2013 by schokokeks.org Hosting, namely
|
Added license tags for CC0,...
Bernd Wurst authored 12 years ago
|
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) */
|
Neue Zertifikatsverwaltung
bernd authored 14 years ago
|
16)
17) require_once("certs.php");
18) require_role(ROLE_SYSTEMUSER);
19)
|
Benutze überall title() sta...
bernd authored 13 years ago
|
20) title("SSL-Zertifikate");
|
Neue Zertifikatsverwaltung
bernd authored 14 years ago
|
21)
|
Allgemeinere Formulierungen...
bernd authored 13 years ago
|
22) output('<p>Bei '.config('company_name').' können Sie Ihre eigenen SSL-Zertifikate nutzen. Wir verwenden dafür (wenn nicht anders vereinbart) die SNI-Technik.
|
text reduziert
hanno authored 14 years ago
|
23) Beim Anlegen von Webserver-Konfigurationen können Sie dann eines Ihrer Zertifikate für jede Konfiguration auswählen.</p>
|
Neue Zertifikatsverwaltung
bernd authored 14 years ago
|
24)
25) <h4>Ihre bisher vorhandenen Zertifikate</h4>
26) ');
27)
28) $certs = user_certs();
29)
30) if (count($certs) > 0)
31) {
32) output("<table><tr><th>Name/Details</th><th>CommonName</th><th>Gültig ab</th><th>Gültig bis</th><th> </th></tr>");
33) foreach ($certs as $c)
34) {
|
Farbige Markierung wenn ein...
bernd authored 12 years ago
|
35) $style="";
36) if ($c['valid_until'] <= date('Y-m-d')) {
37) $style=' style="background-color: #f88;" ';
38) }
39) elseif ($c['valid_until'] <= date('Y-m-d', time()+(30*24*3600))) {
40) $style=' style="background-color: #ff8;" ';
41) }
42) output("<tr><td{$style}>".internal_link('showcert', $c['subject'], "mode=cert&id={$c['id']}")."</td><td{$style}>{$c['cn']}</td><td{$style}>{$c['valid_from']}</td><td{$style}>{$c['valid_until']}</td><td>".internal_link('refreshcert', '<img src="'.$prefix.'images/refresh.png" title="Neue Version des Zertifikats einspielen" />', 'id='.$c['id'])."   ".internal_link('savecert', '<img src="'.$prefix.'images/delete.png" />', 'action=delete&id='.$c['id'])."</td></tr>");
|
Neue Zertifikatsverwaltung
bernd authored 14 years ago
|
43) }
44) output("</table>");
45) }
46) else
47) {
48) output('<p><em>Bisher haben Sie keine Zertifikate eingetragen</em></p>');
49) }
50)
|
addnew() eingeführt
bernd authored 14 years ago
|
51) addnew('newcert', 'Neues Zertifikat eintragen');
|
Neue Zertifikatsverwaltung
bernd authored 14 years ago
|
52)
|
CSR-Erstellung
bernd authored 14 years ago
|
53) output('<h3>offene CSRs</h3>');
54)
55) $csr = user_csr();
56) if (count($csr) > 0)
57) {
58) output("<table><tr><th>Host-/Domainname</th><th>Bitlänge</th><th>Erzeugt am</th><th> </th></tr>");
59) foreach ($csr AS $c)
60) {
61) output("<tr><td>".internal_link('showcert', $c['hostname'], 'mode=csr&id='.$c['id'])."</td><td>{$c['bits']}</td><td>{$c['created']}</td><td>".internal_link('savecert', '<img src="'.$prefix.'images/delete.png" />', 'action=deletecsr&id='.$c['id'])."   ".internal_link('certfromcsr', '<img src="'.$prefix.'images/ok.png" alt="Zertifikat hinzufügen" title="Zertifikat hinzufügen" />', "id={$c['id']}")."</td></tr>");
62) }
63) output("</table>");
64) }
65) else
66) {
67) output('<p><em>Es gibt keine offenen CSRs</em></p>');
68) }
69)
70)
71) output('
72) <p>Wenn Sie ein einfaches Zertifikat benötigen, können Sie mit Hilfe dieser Funktion einen CSR (»certificate signing request«)
|
addnew() eingeführt
bernd authored 14 years ago
|
73) erstellen, mit dem Sie Ihr endgültiges Zertifikat beantragen können.</p>');
74)
75) addnew('newcsr', 'Neuen CSR erzeugen');
|
CSR-Erstellung
bernd authored 14 years ago
|
76)
77)
|