summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorMichael Tänzer <neo@nhng.de>2014-12-05 01:26:02 +0100
committerMichael Tänzer <neo@nhng.de>2014-12-05 01:26:02 +0100
commit5596d4a37845019c6053c184a94689101a7d48a8 (patch)
treebbc315fd77ac97821e6f51703476639810185789 /includes
parent9e373f974a28e3573a419a069bfeb8ce2503f69d (diff)
parent7c3691bce3bfbd46e8e18bd23f0aa566f685c5fe (diff)
downloadcacert-devel-5596d4a37845019c6053c184a94689101a7d48a8.tar.gz
cacert-devel-5596d4a37845019c6053c184a94689101a7d48a8.tar.xz
cacert-devel-5596d4a37845019c6053c184a94689101a7d48a8.zip
Merge remote-tracking branch 'origin/bug-790' into release
Diffstat (limited to 'includes')
-rw-r--r--includes/account.php7
-rw-r--r--includes/keygen.php2
2 files changed, 7 insertions, 2 deletions
diff --git a/includes/account.php b/includes/account.php
index 26845cd..6dacf2d 100644
--- a/includes/account.php
+++ b/includes/account.php
@@ -1560,7 +1560,12 @@ function buildSubjectFromSession() {
}
mysql_query("update `orgemailcerts` set `csr_name`='$CSRname' where `id`='$emailid'");
} else if($_REQUEST['keytype'] == "MS" || $_REQUEST['keytype']=="VI") {
- $csr = "-----BEGIN CERTIFICATE REQUEST-----\n".clean_csr($_REQUEST['CSR'])."-----END CERTIFICATE REQUEST-----\n";
+ $csr = clean_csr($_REQUEST['CSR']);
+ if(strpos($csr,"---BEGIN") === FALSE)
+ {
+ // In case the CSR is missing the ---BEGIN lines, add them automatically:
+ $csr = "-----BEGIN CERTIFICATE REQUEST-----\n".$csr."\n-----END CERTIFICATE REQUEST-----\n";
+ }
if (($weakKey = checkWeakKeyCSR($csr)) !== "")
{
diff --git a/includes/keygen.php b/includes/keygen.php
index 2713a81..15dee8a 100644
--- a/includes/keygen.php
+++ b/includes/keygen.php
@@ -121,7 +121,7 @@ if (array_key_exists('HTTP_USER_AGENT',$_SERVER) && strstr($_SERVER['HTTP_USER_A
<input type="hidden" name="keytype" value="NS">
<?=_("Keysize:")?> <keygen name="SPKAC" challenge="<? $_SESSION['spkac_hash']=make_hash(); echo $_SESSION['spkac_hash']; ?>">
- <input type="submit" name="submit" value="<?=_("Create Certificate Request")?>">
+ <input type="submit" name="submit" value="<?=_("Generate key pair within browser")?>">
<input type="hidden" name="oldid" value="<?=intval($id)?>">
</form>
</p>