summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorjim-p <jimp@pfsense.org>2017-07-05 13:29:55 -0400
committerjim-p <jimp@pfsense.org>2017-07-05 13:30:23 -0400
commitb767fe6cdf7977916d2f245ea529f84f7e0d1f30 (patch)
tree0f66038468fa234143e8dd8a2a12323619e053fd /src/usr
parent2e1809ddc3a50f11b88ba12e196b0f62bcb222a7 (diff)
downloadpfsense-b767fe6cdf7977916d2f245ea529f84f7e0d1f30.zip
pfsense-b767fe6cdf7977916d2f245ea529f84f7e0d1f30.tar.gz
Add the username as the first SAN when making a user certificate from the user manager creation screen. Fixes #7666
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/local/www/system_usermanager.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/usr/local/www/system_usermanager.php b/src/usr/local/www/system_usermanager.php
index 1482663..40024c3 100644
--- a/src/usr/local/www/system_usermanager.php
+++ b/src/usr/local/www/system_usermanager.php
@@ -411,6 +411,10 @@ if ($_POST['save']) {
'organizationName' => $subject[3]['v'],
'emailAddress' => $subject[4]['v'],
'commonName' => $userent['name']);
+ $altnames_tmp = array(cert_add_altname_type($userent['name']));
+ if (!empty($altnames_tmp)) {
+ $dn['subjectAltName'] = implode(",", $altnames_tmp);
+ }
cert_create($cert, $_POST['caref'], $_POST['keylen'],
(int)$_POST['lifetime'], $dn);
OpenPOWER on IntegriCloud