9086c9ad77db90633e0629e9e86a88366265ded0
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) 
Bernd Wurst Copyright year update

Bernd Wurst authored 6 years ago

5) Written 2008-2018 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) 
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) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

11) You should have received a copy of the CC0 Public Domain Dedication along with this software. If not, see
Bernd Wurst Added license tags for CC0,...

Bernd Wurst authored 12 years ago

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 CSR-Erstellung

bernd authored 14 years ago

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

Hanno authored 5 years ago

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

bernd authored 14 years ago

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

Hanno authored 5 years ago

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

bernd authored 14 years ago

33) 
34) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

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

bernd authored 14 years ago

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

Hanno authored 5 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

Hanno authored 5 years ago

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

Hanno authored 5 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

Hanno authored 5 years ago

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

bernd authored 14 years ago

55) 
56) 
Hanno Fix coding style with php-c...

Hanno authored 5 years ago

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

bernd authored 14 years ago

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

Hanno authored 5 years ago

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

bernd authored 14 years ago

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

Hanno authored 5 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

Hanno authored 5 years ago

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

Hanno authored 5 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

bernd authored 14 years ago

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

Hanno authored 5 years ago

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