View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000662 | Main CAcert Website | certificate issuing | public | 2009-01-01 16:28 | 2013-01-15 07:56 |
Reporter | WillerZ | Assigned To | Sourcerer | ||
Priority | normal | Severity | block | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Fixed in Version | 2009 Q2 | ||||
Summary | 0000662: Issuing certificates via the CertAPI facility does not work [solution known] | ||||
Description | The CertApi is documented here: http://wiki.cacert.org/wiki/CertApi The problem occurs in ccsr.php lines 61-71. Currently read: $CSR = trim($_REQUEST['optionalCSR']); $tmpname = tempnam("/tmp", "CSR"); $tempnam = tempnam("/tmp", "CSR"); $fp = fopen($tmpname, "w"); fputs($fp, $CSR); fclose($fp); $do = `/usr/bin/openssl req -in $tmpname -out $tempnam`; @unlink($tmpfname); if(filesize($tempnam) <= 0) die("404,Invalid or missing CSR"); This will work the first time it is run and for a lot of times after that but will eventually start to fail because sooner or later it will be impossible to create a file in /tmp. I recommend changing it to read: $CSR = trim($_REQUEST['optionalCSR']); $incsr = tempnam("/tmp", "CSR"); $checkedcsr = tempnam("/tmp", "CSR"); $fp = fopen($incsr, "w"); fputs($fp, $CSR); fclose($fp); $do = `/usr/bin/openssl req -in $incsr -out $checkedcsr`; @unlink($incsr); if(filesize($checkedcsr) <= 0) die("404,Invalid or missing CSR:".$do); Obviously this also requires the later rename to be changed to: rename($checkedcsr, $CSRname); This change also gives the invoker more information than before if their request fails (they will get the openssl req output from processing their CSR). | ||||
Tags | No tags attached. | ||||
Reviewed by | |||||
Test Instructions | |||||
Date Modified | Username | Field | Change |
---|---|---|---|
2009-01-01 16:28 | WillerZ | New Issue | |
2009-04-09 19:13 | Sourcerer | Note Added: 0001358 | |
2009-04-09 19:13 | Sourcerer | Status | new => solved? |
2009-05-30 23:55 | Sourcerer | Status | solved? => closed |
2009-05-30 23:55 | Sourcerer | Resolution | open => fixed |
2009-05-30 23:55 | Sourcerer | Assigned To | => Sourcerer |
2013-01-15 07:56 | Werner Dworak | Fixed in Version | => 2009 Q2 |