838077f18b71321a685c84329342e6a711d22d09
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

1) <?php
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

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) */
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

16) 
17) include_once('certs.php');
18) require_role(ROLE_SYSTEMUSER);
19) 
bernd neue Bilder, mehr SSL-Zerti...

bernd authored 14 years ago

20) $hint = '';
21) $oldcert = NULL;
22) if (isset($_REQUEST['replace']))
23) {
24)   $cert = cert_details($_REQUEST['replace']);
25)   $oldcert = $cert['id'];
26)   $hint = "<p class=\"warning\"><strong>Hinweis:</strong> Dieses Zertifkkat soll als Ersatz für ein bestehendes Zertifikat eingetragen werden. Dabei wird jede Benutzung des alten Zertifikats durch das neue ersetzt. Das alte Zertifikat wird dann umgehend gelöscht.<p>
27) 
28) <p><strong>Daten des alten Zertifikats:</strong></p>
29) <p><strong>CN:</strong> {$cert['cn']}<br /><strong>Gültigkeit:</strong> {$cert['valid_from']} - {$cert['valid_until']}</p>";
30) 
31) }
32) 
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

33) $section = 'vhosts_certs';
34) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

35) title('Neues Server-Zertifikat hinzufügen');
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

36) 
37) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

38) output('<p>Sie können Ihr eigenes SSL-Zertifikat hinterlegen, das Sie dann für eine oder mehrere Webserver-Konfigurationen verwenden können.</p>
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

39) <p>Sie benötigen dazu mindestens ein <strong>Zertifikat</strong> und einen <strong>privaten Schlüssel</strong> (ohne Passwort!). Alle Daten müssen im <strong>PEM-Format</strong> vorliegen, also in etwa die Form</p>
40) <pre>-----BEGIN CERTIFICATE-----
41) ...
42) -----END CERTIFICATE-----</pre>
bernd neue Bilder, mehr SSL-Zerti...

bernd authored 14 years ago

43) <p>aufweisen. Sind die genannten Vorausetzungen erfüllt, können Sie Ihre Zertifikats-Daten einfach in untenstehendes Formular eingeben.</p>
44) '.$hint);
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

45) 
46) 
47) $form = '
48) <h4>Server-Zertifikat:</h4>
49) <p><textarea name="cert" rows="10" cols="70"></textarea></p>
50) 
51) <h4>privater Schlüssel:</h4>
52) <p><textarea name="key" rows="10" cols="70"></textarea></p>
53) 
54) <p><input type="submit" value="Speichern" /></p>
55) 
56) ';
57)