summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjim-p <jim@pingle.org>2010-05-06 15:32:44 -0400
committerjim-p <jim@pingle.org>2010-05-06 15:33:07 -0400
commit2ef1b601209ce2d3fce5e25ac9c064f6be9c44cc (patch)
treee229b062ab96318dd44f379c392f884a706d1de1
parent7d8a886abc2fad87537cf62028937c83381329f4 (diff)
downloadpfsense-2ef1b601209ce2d3fce5e25ac9c064f6be9c44cc.zip
pfsense-2ef1b601209ce2d3fce5e25ac9c064f6be9c44cc.tar.gz
Write out IPsec PSKs for mobile clients. Part of ticket #108.
-rw-r--r--etc/inc/vpn.inc7
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/inc/vpn.inc b/etc/inc/vpn.inc
index 3aba988..daaf82c 100644
--- a/etc/inc/vpn.inc
+++ b/etc/inc/vpn.inc
@@ -291,6 +291,13 @@ function vpn_ipsec_configure($ipchg = false)
}
}
+ /* add PSKs for mobile clients */
+ if (is_array($ipseccfg['mobilekey'])) {
+ foreach ($ipseccfg['mobilekey'] as $key) {
+ $pskconf .= "{$key['ident']} {$key['pre-shared-key']}\n";
+ }
+ }
+
fwrite($fd, $pskconf);
fclose($fd);
chmod("{$g['varetc_path']}/psk.txt", 0600);
OpenPOWER on IntegriCloud