summaryrefslogtreecommitdiff
path: root/pages
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2014-03-20 00:43:07 +0100
committerMichael Tänzer <neo@nhng.de>2014-03-20 00:43:07 +0100
commit8df925a3427bb53432bd7cff8344e69e0c6c8526 (patch)
tree2ae6d26c5fb9895e48bf7738f9dec4ac2f7f345b /pages
parent1d08addf60c2db2dbe673dc0644555897927379d (diff)
downloadcacert-devel-8df925a3427bb53432bd7cff8344e69e0c6c8526.tar.gz
cacert-devel-8df925a3427bb53432bd7cff8344e69e0c6c8526.tar.xz
cacert-devel-8df925a3427bb53432bd7cff8344e69e0c6c8526.zip
bug 807: Allow changing the hash algorithm used in signing
Signed-off-by: Michael Tänzer <neo@nhng.de>
Diffstat (limited to 'pages')
-rw-r--r--pages/account/10.php27
-rw-r--r--pages/account/16.php14
-rw-r--r--pages/account/20.php28
-rw-r--r--pages/account/3.php13
4 files changed, 74 insertions, 8 deletions
diff --git a/pages/account/10.php b/pages/account/10.php
index 56d6730..82e4c87 100644
--- a/pages/account/10.php
+++ b/pages/account/10.php
@@ -45,13 +45,32 @@
<div id="advanced_options">
<? if($_SESSION['profile']['points'] >= 50) { ?>
-<p>
- <input type="radio" id="root1" name="rootcert" value="1" /> <label for="root1"><?=_("Sign by class 1 root certificate")?></label><br />
- <input type="radio" id="root2" name="rootcert" value="2" checked="checked" /> <label for="root2"><?=_("Sign by class 3 root certificate")?></label>
-</p>
+<ul class="no_indent">
+ <li>
+ <input type="radio" id="root1" name="rootcert" value="1" />
+ <label for="root1"><?=_("Sign by class 1 root certificate")?></label>
+ </li>
+ <li>
+ <input type="radio" id="root2" name="rootcert" value="2" checked="checked" />
+ <label for="root2"><?=_("Sign by class 3 root certificate")?></label>
+ </li>
+</ul>
<p><?=_("Please note: The class 3 root certificate needs to be setup in your webserver as a chained certificate, while slightly more complicated to setup, this root certificate is more likely to be trusted by more people.")?></p>
<? } ?>
+<p class="attach_ul"><?=_("Hash algorithm used when signing the certificate:")?></p>
+<ul class="no_indent">
+<?
+foreach (HASH_ALGORITHMS as $algorithm => $display_string) {
+?>
+ <li>
+ <input type="radio" id="hash_alg_<?=$algorithm?>" name="hash_alg" value="<?=$algorithm?>" <?=(DEFAULT_HASH_ALGORITHM === $algorithm)?'checked="checked"':''?> />
+ <label for="hash_alg_<?=$algorithm?>"><?=$display_string?></label>
+ </li>
+<?
+} ?>
+</ul>
+
</div>
</fieldset>
diff --git a/pages/account/16.php b/pages/account/16.php
index ad86e3d..d2c9787 100644
--- a/pages/account/16.php
+++ b/pages/account/16.php
@@ -66,6 +66,20 @@ if (array_key_exists('emails',$_SESSION['_config']) && is_array($_SESSION['_conf
<?=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))?>
</td>
</tr>
+
+ <tr name="expert">
+ <td class="DataTD" colspan="2" align="left">
+ <?=_("Hash algorithm used when signing the certificate:")?><br />
+ <?
+ foreach (HASH_ALGORITHMS as $algorithm => $display_string) {
+ ?>
+ <input type="radio" id="hash_alg_<?=$algorithm?>" name="hash_alg" value="<?=$algorithm?>" <?=(DEFAULT_HASH_ALGORITHM === $algorithm)?'checked="checked"':''?> />
+ <label for="hash_alg_<?=$algorithm?>"><?=$display_string?></label><br />
+ <?
+ } ?>
+ </td>
+ </tr>
+
<? if($_SESSION['profile']['codesign'] && $_SESSION['profile']['points'] >= 100) { ?>
<tr name="expert">
<td class="DataTD" colspan="2" align="left">
diff --git a/pages/account/20.php b/pages/account/20.php
index c90d9b4..f91440e 100644
--- a/pages/account/20.php
+++ b/pages/account/20.php
@@ -40,11 +40,31 @@
<label for="expertbox"><?=_("Advanced Options")?></label>
</legend>
<div id="advanced_options">
-<p>
- <input type="radio" id="root1" name="rootcert" value="1" /> <label for="root1"><?=_("Sign by class 1 root certificate")?></label><br />
- <input type="radio" id="root2" name="rootcert" value="2" checked="checked" /> <label for="root2"><?=_("Sign by class 3 root certificate")?></label>
-</p>
+<ul class="no_indent">
+ <li>
+ <input type="radio" id="root1" name="rootcert" value="1" />
+ <label for="root1"><?=_("Sign by class 1 root certificate")?></label>
+ </li>
+ <li>
+ <input type="radio" id="root2" name="rootcert" value="2" checked="checked" />
+ <label for="root2"><?=_("Sign by class 3 root certificate")?></label>
+ </li>
+</ul>
<p><?=_("Please note: The class 3 root certificate needs to be setup in your webserver as a chained certificate, while slightly more complicated to setup, this root certificate is more likely to be trusted by more people.")?></p>
+
+<p class="attach_ul"><?=_("Hash algorithm used when signing the certificate:")?></p>
+<ul class="no_indent">
+<?
+foreach (HASH_ALGORITHMS as $algorithm => $display_string) {
+?>
+ <li>
+ <input type="radio" id="hash_alg_<?=$algorithm?>" name="hash_alg" value="<?=$algorithm?>" <?=(DEFAULT_HASH_ALGORITHM === $algorithm)?'checked="checked"':''?> />
+ <label for="hash_alg_<?=$algorithm?>"><?=$display_string?></label>
+ </li>
+<?
+} ?>
+</ul>
+
</div>
</fieldset>
diff --git a/pages/account/3.php b/pages/account/3.php
index d558ed9..7ce4267 100644
--- a/pages/account/3.php
+++ b/pages/account/3.php
@@ -115,6 +115,19 @@ if($_SESSION['profile']['points'] >= 50)
</tr>
<? } ?>
+ <tr name="expert">
+ <td class="DataTD" colspan="2" align="left">
+ <?=_("Hash algorithm used when signing the certificate:")?><br />
+ <?
+ foreach (HASH_ALGORITHMS as $algorithm => $display_string) {
+ ?>
+ <input type="radio" id="hash_alg_<?=$algorithm?>" name="hash_alg" value="<?=$algorithm?>" <?=(DEFAULT_HASH_ALGORITHM === $algorithm)?'checked="checked"':''?> />
+ <label for="hash_alg_<?=$algorithm?>"><?=$display_string?></label><br />
+ <?
+ } ?>
+ </td>
+ </tr>
+
<? if($_SESSION['profile']['points'] >= 100 && $_SESSION['profile']['codesign'] > 0) { ?>
<tr name="expert">
<td class="DataTD">