2 LibreSSL - CAcert web application
3 Copyright (C) 2004-2008 CAcert Inc.
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.
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.
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
18 include_once("../includes/shutdown.php");
20 <form method
="post" action
="account.php">
21 <table align
="center" valign
="middle" border
="0" cellspacing
="0" cellpadding
="0" class="wrapper">
23 <td colspan
="2" class="title"><?
=_("New Client Certificate")?
></td
>
26 <td
class="DataTD"><?
=_("Add")?
></td
>
27 <td
class="DataTD"><?
=_("Address")?
></td
>
29 if (array_key_exists('emails',$_SESSION['_config']) && is_array($_SESSION['_config']['emails'])) {
31 foreach($_SESSION['_config']['emails'] as $val) {
34 <td
class="DataTD"><label
for="email<?=$i?>"><?
=_("Email")?
></label
></td
>
35 <td
class="DataTD"><input type
="text" id
="email<?=$i?>" name
="emails[]" value
="<?=$val?>"/></td
>
42 <td
class="DataTD"><label
for="email0"><?
=_("Email")?
></td
>
43 <td
class="DataTD"><input type
="text" id
="email0" name
="emails[]"/></td
>
46 <td
class="DataTD"><label
for="name"><?
=_("Name")?
></label
></td
>
47 <td
class="DataTD"><input type
="text" id
="name" name
="name" value
="<?=array_key_exists('name',$_SESSION['_config'])?($_SESSION['_config']['name']):''?>"/></td
>
50 <td
class="DataTD"><label
for="OU"><?
=_("Department")?
></label
></td
>
51 <td
class="DataTD"><input type
="text" id
="OU" name
="OU" value
="<?=array_key_exists('OU',$_SESSION['_config'])?($_SESSION['_config']['OU']):''?>"/></td
>
54 <tr name
="expertoff" style
="display:none">
56 <input type
="checkbox" id
="expertbox" name
="expertbox" onchange
="showExpert(this.checked)" />
59 <label
for="expertbox"><?
=_("Show advanced options")?
></label
>
63 <td
class="DataTD" colspan
="2" align
="left">
64 <input type
="radio" id
="root1" name
="rootcert" value
="1" /> <label
for="root1"><?
=_("Sign by class 1 root certificate")?
></label
><br
/>
65 <input type
="radio" id
="root2" name
="rootcert" value
="2" checked
="checked" /> <label
for="root2"><?
=_("Sign by class 3 root certificate")?
></label
><br
/>
66 <?
=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."), 60))?
>
71 <td
class="DataTD" colspan
="2" align
="left">
72 <?
=_("Hash algorithm used when signing the certificate:")?
><br
/>
74 foreach (HashAlgorithms
::getInfo() as $algorithm => $display_info) {
76 <input type
="radio" id
="hash_alg_<?=$algorithm?>" name
="hash_alg" value
="<?=$algorithm?>" <?
=(HashAlgorithms
::$default === $algorithm)?
'checked="checked"':''?
> />
77 <label
for="hash_alg_<?=$algorithm?>"><?
=$display_info['name']?
><?
=$display_info['info']?
' - '.$display_info['info']:''?
></label
><br
/>
84 <?
if($_SESSION['profile']['codesign'] && $_SESSION['profile']['points'] >= 100) { ?
>
86 <td
class="DataTD" colspan
="2" align
="left">
87 <input type
="checkbox" id
="codesign" name
="codesign" value
="1" />
88 <label
for="codesign"><?
=_("Code Signing")?
></label
>
93 <td
class="DataTD" colspan
="2" align
="left">
94 <label
for="description"><?
=_("Optional comment, only used in the certificate overview")?
></label
><br
/>
95 <input type
="text" id
="description" name
="description" maxlength
="80" size
="80" />
99 <td
class="DataTD" colspan
="2">
100 <input type
="submit" name
="add_email" value
="<?=_("Add Another Email Address
")?>">
101 <input type
="submit" name
="process" value
="<?=_("Next
")?>" />
105 <input type
="hidden" name
="oldid" value
="<?=$id?>">
108 <script language
="javascript">
109 function showExpert(a
)
111 b
=document
.getElementsByName("expert");
112 for(i
=0;b
.length
>i
;i++
)
114 if(!a
) {b
[i
].setAttribute("style","display:none"); }
115 else {b
[i
].removeAttribute("style");}
117 b
=document
.getElementsByName("expertoff");
118 for(i
=0;b
.length
>i
;i++
)
120 b
[i
].removeAttribute("style");