summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2010-09-02 12:35:58 -0400
committerjim-p <jimp@pfsense.org>2010-09-02 16:50:13 -0400
commit3554c9f05c1bcb74a14eefb4b97917f0e70ba1c1 (patch)
tree2a0b13973da90d416742df133a2ea790e8426b80 /usr
parent79e1ffedf18806957fbb597911e63a957db05195 (diff)
downloadpfsense-3554c9f05c1bcb74a14eefb4b97917f0e70ba1c1.zip
pfsense-3554c9f05c1bcb74a14eefb4b97917f0e70ba1c1.tar.gz
When generating a user cert, put it in with the rest of the certificates and store a reference in the user.
Diffstat (limited to 'usr')
-rw-r--r--usr/local/www/system_usermanager_addcert.php7
1 files changed, 5 insertions, 2 deletions
diff --git a/usr/local/www/system_usermanager_addcert.php b/usr/local/www/system_usermanager_addcert.php
index 1584bc2..f508d85 100644
--- a/usr/local/www/system_usermanager_addcert.php
+++ b/usr/local/www/system_usermanager_addcert.php
@@ -115,7 +115,7 @@ if ($_POST) {
if (!is_array($a_user[$userid]['cert']))
$a_user[$userid]['cert'] = array();
- $cert['name'] = $pconfig['name'];
+ $cert['name'] = $pconfig['name'];
$subject = cert_get_subject_array($ca['crt']);
@@ -130,7 +130,10 @@ if ($_POST) {
cert_create($cert, $pconfig['caref'], $pconfig['keylen'],
$pconfig['lifetime'], $dn);
- $a_user[$userid]['cert'][] = $cert;
+ if (!is_array($config['cert']))
+ $config['cert'] = array();
+ $config['cert'][] = $cert;
+ $a_user[$userid]['cert'][] = $cert['refid'];
write_config();
OpenPOWER on IntegriCloud