3ef995c2108fe77d22c0b556fb9717cb848bc48f
bernd CSR-Erstellung

bernd authored 15 years ago

1) <?php
Hanno Böck Add newlines before comment...

Hanno Böck authored 1 month ago

2) 
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 13 years ago

3) /*
4) This file belongs to the Webinterface of schokokeks.org Hosting
5) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

6) Written by schokokeks.org Hosting, namely
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 13 years ago

7)   Bernd Wurst <bernd@schokokeks.org>
8)   Hanno Böck <hanno@schokokeks.org>
9) 
Hanno Böck Change license from CC0 to...

Hanno Böck authored 2 years ago

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

Bernd Wurst authored 13 years ago

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

bernd authored 15 years ago

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

Hanno authored 6 years ago

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

bernd authored 15 years ago

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

Hanno authored 6 years ago

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

bernd authored 15 years ago

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

Hanno authored 6 years ago

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

bernd authored 15 years ago

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

Hanno authored 6 years ago

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

bernd authored 15 years ago

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

bernd authored 15 years ago

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

bernd authored 15 years ago

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

Hanno authored 6 years ago

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

Hanno authored 6 years ago

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

bernd authored 15 years ago

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

bernd authored 15 years ago

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

bernd authored 15 years ago

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

Hanno authored 6 years ago

50)     } else {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

51)         output('<p>' . internal_link('', 'privaten Schlüssel auch anzeigen', "mode={$_REQUEST['mode']}&id={$_REQUEST['id']}&private=yes") . '</p>');
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

52)     }
bernd CSR-Erstellung

bernd authored 15 years ago

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

Hanno authored 6 years ago

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

bernd authored 15 years ago

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

Hanno authored 6 years ago

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

bernd authored 15 years ago

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

Hanno authored 6 years ago

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

bernd authored 15 years ago

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

bernd authored 15 years ago

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

bernd authored 15 years ago

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

Hanno authored 6 years ago

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

Hanno authored 6 years ago

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

bernd authored 15 years ago

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

bernd authored 15 years ago

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

bernd authored 15 years ago

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

Hanno authored 6 years ago

78)     } else {
Hanno Böck Spaces between string conca...

Hanno Böck authored 1 year ago

79)         output('<p>' . internal_link('', 'privaten Schlüssel auch anzeigen', "mode={$_REQUEST['mode']}&id={$_REQUEST['id']}&private=yes") . '</p>');
Hanno Fix coding style with php-c...

Hanno authored 6 years ago

80)     }