summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Dörre <felix@dogcraft.de>2014-06-12 23:12:42 +0200
committerFelix Dörre <felix@dogcraft.de>2014-06-13 02:35:20 +0200
commitb463d175196b5e8abbfbc5e00e161d5c69113565 (patch)
tree4d81993ef9bd5cdc084b40d2acbf9ee96b1d54d4
parentf25f8af03c96cfcd4dd83a9f3b6ee4181eb3e2c9 (diff)
downloadcacert-devel-b463d175196b5e8abbfbc5e00e161d5c69113565.tar.gz
cacert-devel-b463d175196b5e8abbfbc5e00e161d5c69113565.tar.xz
cacert-devel-b463d175196b5e8abbfbc5e00e161d5c69113565.zip
bug 807: copy md setting to new certificate when renewing
When the user renews a certificate, copy the digest algorithm to the new certificate.
-rw-r--r--includes/account.php12
1 files changed, 8 insertions, 4 deletions
diff --git a/includes/account.php b/includes/account.php
index b1ab984..6de1e68 100644
--- a/includes/account.php
+++ b/includes/account.php
@@ -905,7 +905,8 @@ function buildSubjectFromSession() {
`rootcert`='".intval($row['rootcert'])."',
`type`='".intval($row['type'])."',
`pkhash`='".mysql_real_escape_string($row['pkhash'])."',
- `description`='".mysql_real_escape_string($row['description'])."'";
+ `description`='".mysql_real_escape_string($row['description'])."',
+ `md`='".$row['md']."'";
mysql_query($query);
$newid = mysql_insert_id();
$newfile=generatecertpath("csr","server",$newid);
@@ -1085,7 +1086,8 @@ function buildSubjectFromSession() {
`disablelogin`='".intval($row['disablelogin'])."',
`codesign`='".intval($row['codesign'])."',
`rootcert`='".intval($row['rootcert'])."',
- `description`='".mysql_real_escape_string($row['description'])."'";
+ `description`='".mysql_real_escape_string($row['description'])."',
+ `md`='".$row['md']."'";
mysql_query($query);
$newid = mysql_insert_id();
$newfile=generatecertpath("csr","client",$newid);
@@ -1719,7 +1721,8 @@ function buildSubjectFromSession() {
`modified`=NOW(),
`codesign`='".intval($row['codesign'])."',
`rootcert`='".intval($row['rootcert'])."',
- `description`='".mysql_real_escape_string($row['description'])."'";
+ `description`='".mysql_real_escape_string($row['description'])."',
+ `md`='".$row['md']."'";
mysql_query($query);
$newid = mysql_insert_id();
$newfile=generatecertpath("csr","orgclient",$newid);
@@ -2071,7 +2074,8 @@ function buildSubjectFromSession() {
`subject`='".mysql_real_escape_string($row['subject'])."',
`type`='".intval($row['type'])."',
`rootcert`='".intval($row['rootcert'])."',
- `description`='".mysql_real_escape_string($row['description'])."'";
+ `description`='".mysql_real_escape_string($row['description'])."',
+ `md`='".$row['md']."'";
mysql_query($query);
$newid = mysql_insert_id();
//echo "NewID: $newid<br/>\n";