View Issue Details

IDProjectCategoryView StatusLast Update
0000054Main CAcert Websiteorganisational sectionpublic2013-01-13 15:02
Reporterandrewdied Assigned ToSourcerer  
PrioritynormalSeverityfeatureReproducibilityalways
Status closedResolutionfixed 
Fixed in Version2007 
Summary0000054: Issue org code signing certs
DescriptionI would like to be able to issue organizational code signing certs. Currently I can only issue org client or server certs.
TagsNo tags attached.
Reviewed by
Test Instructions

Activities

sfought

2007-12-12 13:54

reporter   ~0000969

Here are proposed patches for this issue. While this code should set a codesign field, which is new, in the orgemailcerts table, I can't figure out where the cert generation code uses codesign or any of the other orgemailcerts vars. I'll follow up if someone can tell me where to hook the new var up.

--- cacert/includes/cacert.sql.orig 2005-01-03 21:33:56.000000000 -0500
+++ cacert/includes/cacert.sql 2007-12-12 08:24:44.000000000 -0500
@@ -252,6 +252,7 @@
   `CN` varchar(255) NOT NULL default '',
   `subject` text NOT NULL,
   `keytype` char(2) NOT NULL default 'NS',
+ `codesign` tinyint(1) NOT NULL default '0',
   `csr_name` varchar(255) NOT NULL default '',
   `crt_name` varchar(255) NOT NULL default '',
   `created` datetime NOT NULL default '0000-00-00 00:00:00',

--- cacert/pages/account/16.php.orig 2007-12-12 08:29:59.000000000 -0500
+++ cacert/pages/account/16.php 2007-12-12 08:40:46.000000000 -0500
@@ -49,6 +49,9 @@
     </td>
   </tr>
   <tr>
+ <td class="DataTD" colspan="2" align="left"><input type="checkbox" name="codesign" value="0"> <?=_("Code Signing ")?></td>
+ </tr>
+ <tr>
     <td class="DataTD" colspan="2"><input type="submit" name="process" value="<?=_("Another Email")?>">
                        <input type="submit" name="process" value="<?=_("Next")?>"></td>
   </tr>

--- cacert/includes/account.php.orig 2007-09-29 18:46:47.000000000 -0400
+++ cacert/includes/account.php 2007-12-12 08:22:38.000000000 -0500
@@ -1181,6 +1181,15 @@
 
        if($oldid == 16 && $_REQUEST['process'] != "")
        {
+ if($_REQUEST['codesign'] != 0 && ($_SESSION['profile']['codesign'] == 0 || $_SESSION['profile']['points'] < 100))
+ {
+ $_REQUEST['codesign'] = 0;
+ }
+ if($_REQUEST['codesign'] == 1 && $_SESSION['profile']['points'] >= 100)
+ $_SESSION['_config']['codesign'] = 1;
+ else
+ $_SESSION['_config']['codesign'] = 0;
+
                $_SESSION['_config']['rootcert'] = intval($_REQUEST['rootcert']);
                if($_SESSION['_config']['rootcert'] < 1 || $_SESSION['_config']['rootcert'] > 2)
                        $_SESSION['_config']['rootcert'] = 1;
@@ -1231,6 +1240,7 @@
                        $query = "insert into `orgemailcerts` set `CN`='$defaultemail', `keytype`='NS',
                                                `orgid`='".$org['orgid']."',
                                                `created`=FROM_UNIXTIME(UNIX_TIMESTAMP()),
+ `codesign`='".$_SESSION['_config']['codesign']."',
                                                `rootcert`='".$_SESSION['_config']['rootcert']."'";
                        mysql_query($query);
                        $emailid = mysql_insert_id();
@@ -1294,6 +1304,7 @@
                                                `orgid`='".$org['orgid']."',
                                                `created`=FROM_UNIXTIME(UNIX_TIMESTAMP()),
                                                `subject`='$csrsubject',
+ `codesign`='".$_SESSION['_config']['codesign']."',
                                                `rootcert`='".$_SESSION['_config']['rootcert']."'";
                        mysql_query($query);
                        $emailid = mysql_insert_id();

Sourcerer

2007-12-19 22:11

administrator   ~0000970

The patch was applied, but had to be changed slightly. Changes tested on IE,FF,KQ,OP successfully. Luckily the CommModule already supported Organisational Codesigning.

Sourcerer

2007-12-19 22:11

administrator   ~0000971

Thanks a lot to sfought for the patch!

Issue History

Date Modified Username Field Change
2005-09-07 08:48 andrewdied New Issue
2006-08-16 19:14 duane Status new => needs work
2006-08-16 19:14 duane Assigned To => duane
2007-06-25 08:23 evaldo Assigned To duane =>
2007-06-25 08:23 evaldo Status needs work => confirmed
2007-06-25 08:23 evaldo Projection none => minor fix
2007-12-12 13:54 sfought Note Added: 0000969
2007-12-19 22:11 Sourcerer Status confirmed => solved?
2007-12-19 22:11 Sourcerer Fixed in Version => production
2007-12-19 22:11 Sourcerer Resolution open => fixed
2007-12-19 22:11 Sourcerer Assigned To => Sourcerer
2007-12-19 22:11 Sourcerer Note Added: 0000970
2007-12-19 22:11 Sourcerer Note Added: 0000971
2009-04-09 21:03 Sourcerer Status solved? => closed
2013-01-13 15:02 Werner Dworak Fixed in Version => 2007