diff options
author | jim-p <jimp@pfsense.org> | 2017-07-05 13:29:55 -0400 |
---|---|---|
committer | jim-p <jimp@pfsense.org> | 2017-07-05 13:30:23 -0400 |
commit | b767fe6cdf7977916d2f245ea529f84f7e0d1f30 (patch) | |
tree | 0f66038468fa234143e8dd8a2a12323619e053fd /src/usr/local | |
parent | 2e1809ddc3a50f11b88ba12e196b0f62bcb222a7 (diff) | |
download | pfsense-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/local')
-rw-r--r-- | src/usr/local/www/system_usermanager.php | 4 |
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); |