dcc202fb249a446ac15c7cf413b9f1b4a3f31b58
bernd CSR-Erstellung

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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

5) Written by schokokeks.org Hosting, namely
Bernd Wurst 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) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 1 year ago

9) This code is published under a 0BSD license.
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

10) 
11) 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.
12) */
bernd CSR-Erstellung

bernd authored 14 years ago

13) 
14) require_once('certs.php');
15) require_role(ROLE_SYSTEMUSER);
16) 
17) $mode = 'cert';
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

18) if ($_REQUEST['mode'] == 'csr') {
19)     $mode = 'csr';
20) }
bernd CSR-Erstellung

bernd authored 14 years ago

21) 
22) 
23) $section = 'vhosts_certs';
24) 
25) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

26) if ($mode == 'csr') {
27)     $data = csr_details($_REQUEST['id']);
28)     $cert = $data['csr'];
29)     $key = $data['key'];
bernd CSR-Erstellung

bernd authored 14 years ago

30) 
31) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

32)     title('CSR anzeigen');
33)     output("<p>Untenstehend sehen Sie Ihren automatisch erzeugten CSR (»certificate signing request«) und evtl.
bernd CSR-Erstellung

bernd authored 14 years ago

34)   den dazu gehörigen privaten Schlüssel. Sofern Sie den privaten Schlüssel auf Ihrer Festplatte 
35)   speichern, stellen Sie bitte sicher, dass dieser vor unbefugtem Zugriff geschützt ist. Der
36)   private Schlüssel ist selbst <strong>nicht verschlüsselt</strong> und nicht mit einem 
37)   Passwort geschützt.</p>");
38) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

39)     output("<h4>CSR</h4>
bernd Benutze <textarea> für Zert...

bernd authored 14 years ago

40)   <textarea cols=\"70\" rows=\"20\">
bernd CSR-Erstellung

bernd authored 14 years ago

41) {$cert}
bernd Benutze <textarea> für Zert...

bernd authored 14 years ago

42) </textarea>");
Hanno remove whitespace in empty...

Hanno authored 5 years ago

43) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

44)     if (isset($_REQUEST['private']) && $_REQUEST['private'] == 'yes') {
45)         output("<h4>privater Schlüssel</h4>
bernd Benutze <textarea> für Zert...

bernd authored 14 years ago

46) <textarea cols=\"70\" rows=\"20\">
bernd CSR-Erstellung

bernd authored 14 years ago

47) {$key}
bernd Benutze <textarea> für Zert...

bernd authored 14 years ago

48) </textarea>");
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

49)     } else {
50)         output('<p>'.internal_link('', 'privaten Schlüssel auch anzeigen', "mode={$_REQUEST['mode']}&id={$_REQUEST['id']}&private=yes").'</p>');
51)     }
bernd CSR-Erstellung

bernd authored 14 years ago

52) 
53) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

54)     addnew('certfromcsr', 'Unterschriebenes Zertifikat eingeben', "id={$_REQUEST['id']}");
55) } else {
56)     $data = cert_details($_REQUEST['id']);
57)     $cert = $data['cert'];
58)     $key = $data['key'];
bernd CSR-Erstellung

bernd authored 14 years ago

59) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

60)     title('Zertifikat anzeigen');
61)     output("<p>Untenstehend sehen Sie Ihr Zertifikat und evtl. den dazu gehörigen privaten 
bernd CSR-Erstellung

bernd authored 14 years ago

62)   Schlüssel. Sofern Sie den privaten Schlüssel auf Ihrer Festplatte speichern, stellen 
63)   Sie bitte sicher, dass dieser vor unbefugtem Zugriff geschützt ist. Der private 
64)   Schlüssel ist selbst <strong>nicht verschlüsselt</strong> und nicht mit einem 
65)   Passwort geschützt.</p>");
66) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

67)     output("<h4>Zertifikat</h4>
bernd Benutze <textarea> für Zert...

bernd authored 14 years ago

68)   <textarea cols=\"70\" rows=\"20\">
bernd CSR-Erstellung

bernd authored 14 years ago

69) {$cert}
bernd Benutze <textarea> für Zert...

bernd authored 14 years ago

70) </textarea>");
Hanno remove whitespace in empty...

Hanno authored 5 years ago

71) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

72)     if (isset($_REQUEST['private']) && $_REQUEST['private'] == 'yes') {
73)         output("<h4>privater Schlüssel</h4>
bernd Benutze <textarea> für Zert...

bernd authored 14 years ago

74) <textarea cols=\"70\" rows=\"20\">
bernd CSR-Erstellung

bernd authored 14 years ago

75) {$key}
bernd Benutze <textarea> für Zert...

bernd authored 14 years ago

76) </textarea>");
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

77)     } else {
78)         output('<p>'.internal_link('', 'privaten Schlüssel auch anzeigen', "mode={$_REQUEST['mode']}&id={$_REQUEST['id']}&private=yes").'</p>');
79)     }