summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-04-28 02:15:54 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-04-28 02:15:54 +0000
commit81494c665b130972bb1fa199554f2e817a31a914 (patch)
tree915bf50abe0a245ba9f33d73506fde5467523ed2 /etc
parent3a6bed46b4275025e57fe1e8fa6742cdc3512cad (diff)
downloadpfsense-81494c665b130972bb1fa199554f2e817a31a914.zip
pfsense-81494c665b130972bb1fa199554f2e817a31a914.tar.gz
Use $int$port$proto for unique server name
Diffstat (limited to 'etc')
-rw-r--r--etc/inc/openvpn.inc3
1 files changed, 2 insertions, 1 deletions
diff --git a/etc/inc/openvpn.inc b/etc/inc/openvpn.inc
index 55fe2fc..99d25f6 100644
--- a/etc/inc/openvpn.inc
+++ b/etc/inc/openvpn.inc
@@ -301,6 +301,7 @@ function openvpn_server_create_cert($mode, $id) {
return;
global $g, $config;
$settings = $config['installedpackages']["openvpn$mode"]['config'][$id];
+ $serveruniq = $settings['interface'] . $settings['local_port'] . $settings['protocol'];
log_error("Creating server certificate for {$settings['description']}.");
$caname = $settings['cipherpki'];
foreach($config['openvpn']['keys'] as $ca) {
@@ -314,7 +315,7 @@ function openvpn_server_create_cert($mode, $id) {
fwrite($fd, "#!/bin/tcsh\n");
fwrite($fd, "cd $ovpncapath \n");
fwrite($fd, "source $ovpncapath/$caname/vars \n");
- fwrite($fd, "$easyrsapath/pkitool --batch --server {$caname} \n");
+ fwrite($fd, "$easyrsapath/pkitool --batch --server {$serveruniq} \n");
fwrite($fd, "openssl dhparam -out $ovpncapath/$caname/dh_params.dh $cakeysize \n");
fclose($fd);
system("/bin/chmod a+rx $ovpncapath/RUNME_2ND");
OpenPOWER on IntegriCloud