Source code taken from cacert-20141124.tar.bz2
[cacert.git] / pages / account / 3.php
1 <? /*
2 LibreSSL - CAcert web application
3 Copyright (C) 2004-2008 CAcert Inc.
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; version 2 of the License.
8
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 include_once("../includes/shutdown.php");
19 ?>
20 <h3><?=_("CAcert Certificate Acceptable Use Policy")?></h3>
21 <p><?=_("Once you decide to subscribe for an SSL Server Certificate you will need to complete this agreement. Please read it carefully. Your Certificate Request can only be processed with your acceptance and understanding of this agreement.")?></p>
22
23 <p><?=_("I hereby represent that I am fully authorized by the owner of the information contained in the CSR sent to CAcert Inc. to apply for an Digital Certificate for secure and authenticated electronic transactions. I understand that a digital certificate serves to identify the Subscriber for the purposes of electronic communication and that the management of the private keys associated with such certificates is the responsibility of the subscriber's technical staff and/or contractors.")?></p>
24
25 <p><?=_("CAcert Inc.'s public certification services are governed by a CPS as amended from time to time which is incorporated into this Agreement by reference. The Subscriber will use the SSL Server Certificate in accordance with CAcert Inc.'s CPS and supporting documentation published at")?> <a href="http://www.cacert.org/cps.php">http://www.cacert.org/cps.php</a></p>
26
27 <p><?=_("If the Subscriber's name and/or domain name registration change the subscriber will immediately inform CAcert Inc. who shall revoke the digital certificate. When the Digital Certificate expires or is revoked the company will permanently remove the certificate from the server on which it is installed and will not use it for any purpose thereafter. The person responsible for key management and security is fully authorized to install and utilize the certificate to represent this organization's electronic presence.")?></p>
28
29 <form method="post" action="account.php">
30 <table align="center" valign="middle" border="0" cellspacing="0" cellpadding="0" class="wrapper">
31 <tr>
32 <td colspan="2" class="title"><?=_("New Client Certificate")?></td>
33 </tr>
34 <tr>
35 <td class="DataTD"><?=_("Add")?></td>
36 <td class="DataTD"><?=_("Address")?></td>
37 </tr>
38
39 <?
40 $query = "select * from `email` where `memid`='".intval($_SESSION['profile']['id'])."' and `deleted`=0 and `hash`=''";
41 $res = mysql_query($query);
42 while($row = mysql_fetch_assoc($res))
43 { ?>
44 <tr>
45 <td class="DataTD"><input type="checkbox" id="addid<?=intval($row['id'])?>" name="addid[]" value="<?=intval($row['id'])?>"></td>
46 <td class="DataTD" align="left"><label for="addid<?=intval($row['id'])?>"><?=sanitizeHTML($row['email'])?></label></td>
47 </tr>
48 <? }
49 if($_SESSION['profile']['points'] >= 50)
50 {
51 $fname = $_SESSION['profile']['fname'];
52 $mname = $_SESSION['profile']['mname'];
53 $lname = $_SESSION['profile']['lname'];
54 $suffix = $_SESSION['profile']['suffix'];
55 ?>
56 <tr>
57 <td class="DataTD" colspan="2" align="left">
58 <input type="radio" id="incname0" name="incname" value="0" checked="checked" />
59 <label for="incname0"><?=_("No Name")?></label><br />
60 <? if($fname && $lname) { ?>
61 <input type="radio" id="incname1" name="incname" value="1" />
62 <label for="incname1"><?=_("Include")?> '<?=$fname." ".$lname?>'</label><br />
63 <? } ?>
64 <? if($fname && $mname && $lname) { ?>
65 <input type="radio" id="incname2" name="incname" value="2" />
66 <label for="incname2"><?=_("Include")?> '<?=$fname." ".$mname." ".$lname?>'</label><br />
67 <? } ?>
68 <? if($fname && $lname && $suffix) { ?>
69 <input type="radio" id="incname3" name="incname" value="3" />
70 <label for="incname3"><?=_("Include")?> '<?=$fname." ".$lname." ".$suffix?>'</label><br />
71 <? } ?>
72 <? if($fname && $mname && $lname && $suffix) { ?>
73 <input type="radio" id="incname4" name="incname" value="4" />
74 <label for="incname4"><?=_("Include")?> '<?=$fname." ".$mname." ".$lname." ".$suffix?>'</label><br />
75 <? } ?>
76 </td>
77 </tr>
78 <? } ?>
79
80 <tr>
81 <td class="DataTD">
82 <input type="checkbox" id="login" name="login" value="1" checked="checked" />
83 </td>
84 <td class="DataTD" align="left">
85 <label for="login"><?=_("Enable certificate login with this certificate")?><br />
86 <?=_("By allowing certificate login, this certificate can be used to login into this account at https://secure.cacert.org/ .")?></label>
87 </td>
88 </tr>
89 <tr>
90 <td class="DataTD" colspan="2" align="left">
91 <label for="description"><?=_("Optional comment, only used in the certificate overview")?></label><br />
92 <input type="text" id="description" name="description" maxlength="100" size="100" />
93 </td>
94 </tr>
95
96 <tr name="expertoff" style="display:none">
97 <td class="DataTD">
98 <input type="checkbox" id="expertbox" name="expertbox" onchange="showExpert(this.checked)" />
99 </td>
100 <td class="DataTD" align="left">
101 <label for="expertbox"><?=_("Show advanced options")?></label>
102 </td>
103 </tr>
104
105 <?
106 if($_SESSION['profile']['points'] >= 50)
107 {
108 ?>
109 <tr name="expert">
110 <td class="DataTD" colspan="2" align="left">
111 <input type="radio" id="root1" name="rootcert" value="1" /> <label for="root1"><?=_("Sign by class 1 root certificate")?></label><br />
112 <input type="radio" id="root2" name="rootcert" value="2" checked="checked" /> <label for="root2"><?=_("Sign by class 3 root certificate")?></label><br />
113 <?=str_replace("\n", "<br />\n", wordwrap(_("Please note: If you use a certificate signed by the class 3 root, the class 3 root certificate needs to be imported into your email program as well as the class 1 root certificate so your email program can build a full trust path chain."), 125))?>
114 </td>
115 </tr>
116 <? } ?>
117
118 <tr name="expert">
119 <td class="DataTD" colspan="2" align="left">
120 <?=_("Hash algorithm used when signing the certificate:")?><br />
121 <?
122 foreach (HashAlgorithms::getInfo() as $algorithm => $display_info) {
123 ?>
124 <input type="radio" id="hash_alg_<?=$algorithm?>" name="hash_alg" value="<?=$algorithm?>" <?=(HashAlgorithms::$default === $algorithm)?'checked="checked"':''?> />
125 <label for="hash_alg_<?=$algorithm?>"><?=$display_info['name']?><?=$display_info['info']?' - '.$display_info['info']:''?></label><br />
126 <?
127 }
128 ?>
129 </td>
130 </tr>
131
132 <? if($_SESSION['profile']['points'] >= 100 && $_SESSION['profile']['codesign'] > 0) { ?>
133 <tr name="expert">
134 <td class="DataTD">
135 <input type="checkbox" id="codesign" name="codesign" value="1" />
136 </td>
137 <td class="DataTD" align="left">
138 <label for="codesign"><?=_("Code Signing")?><br />
139 <?=_("Please note: By ticking this box you will automatically have your name included in the certificate.")?></label>
140 </td>
141 </tr>
142 <? } ?>
143
144 <tr name="expert">
145 <td class="DataTD">
146 <input type="checkbox" id="SSO" name="SSO" value="1" />
147 </td>
148 <td class="DataTD" align="left">
149 <label for="SSO"><?=_("Add Single Sign On ID Information")?><br />
150 <?=str_replace("\n", "<br>\n", wordwrap(_("By adding Single Sign On (SSO) ID information to your certificates this could be used to track you, you can also issue certificates with no email addresses that are useful only for Authentication. Please see a more detailed description on our WIKI about it."), 125))?>
151 <a href="http://wiki.cacert.org/wiki/SSO"><?=_("SSO WIKI Entry")?></a></label>
152 </td>
153 </tr>
154
155 <tr name="expert">
156 <td class="DataTD" colspan="2">
157 <label for="optionalCSR"><?=_("Optional Client CSR, no information on the certificate will be used")?></label><br />
158 <textarea id="optionalCSR" name="optionalCSR" cols="80" rows="5"></textarea>
159 </td>
160 </tr>
161
162
163 <tr>
164 <td class="DataTD">
165 <input type="checkbox" id="CCA" name="CCA" />
166 </td>
167 <td class="DataTD" align="left">
168 <label for="CCA"><strong><?=sprintf(_("I accept the CAcert Community Agreement (%s)."),"<a href='/policy/CAcertCommunityAgreement.html'>CCA</a>")?></strong><br />
169 <?=_("Please note: You need to accept the CCA to proceed.")?></label>
170 </td>
171 </tr>
172 <tr>
173 <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Next")?>" /></td>
174 </tr>
175 </table>
176 <input type="hidden" name="oldid" value="<?=$id?>" />
177 </form>
178
179 <script language="javascript">
180 function showExpert(a)
181 {
182 b=document.getElementsByName("expert");
183 for(i=0;b.length>i;i++)
184 {
185 if(!a) {b[i].setAttribute("style","display:none"); }
186 else {b[i].removeAttribute("style");}
187 }
188 b=document.getElementsByName("expertoff");
189 for(i=0;b.length>i;i++)
190 {
191 b[i].removeAttribute("style");
192 }
193
194 }
195 showExpert(false);
196 </script>