f2550e90ad37215b9d890155806986336bf0170c
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

1) <?php
2) 
3) include_once('certs.php');
4) require_role(ROLE_SYSTEMUSER);
5) 
bernd neue Bilder, mehr SSL-Zerti...

bernd authored 14 years ago

6) $hint = '';
7) $oldcert = NULL;
8) if (isset($_REQUEST['replace']))
9) {
10)   $cert = cert_details($_REQUEST['replace']);
11)   $oldcert = $cert['id'];
12)   $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>
13) 
14) <p><strong>Daten des alten Zertifikats:</strong></p>
15) <p><strong>CN:</strong> {$cert['cn']}<br /><strong>Gültigkeit:</strong> {$cert['valid_from']} - {$cert['valid_until']}</p>";
16) 
17) }
18) 
bernd Neue Zertifikatsverwaltung

bernd authored 14 years ago

19) $section = 'vhosts_certs';
20) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

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

bernd authored 14 years ago

22) 
23) 
bernd Benutze überall title() sta...

bernd authored 13 years ago

24) 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

25) <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>
26) <pre>-----BEGIN CERTIFICATE-----
27) ...
28) -----END CERTIFICATE-----</pre>
bernd neue Bilder, mehr SSL-Zerti...

bernd authored 14 years ago

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

bernd authored 14 years ago

31) 
32) 
33) $form = '
34) <h4>Server-Zertifikat:</h4>
35) <p><textarea name="cert" rows="10" cols="70"></textarea></p>
36) 
37) <h4>privater Schlüssel:</h4>
38) <p><textarea name="key" rows="10" cols="70"></textarea></p>
39) 
40) <p><input type="submit" value="Speichern" /></p>
41) 
42) ';
43)