ipsec, add support for elliptical curve dh groups and change default dhgroup in the process (from 2 -> 24), last but not least some dhgroups seemed to be missing an implementation. for https://github.com/opnsense/core/issues/1942

This commit is contained in:
Ad Schellevis 2017-11-20 13:10:42 +01:00
parent df4de782b3
commit 581b8b17bc
3 changed files with 25 additions and 1 deletions

View File

@ -632,6 +632,24 @@ function ipsec_convert_to_modp($index)
case '18':
$convertion = "modp8192";
break;
case '19':
$convertion = "ecp256";
break;
case '20':
$convertion = "ecp384";
break;
case '21':
$convertion = "ecp521";
break;
case '22':
$convertion = "modp1024s160";
break;
case '23':
$convertion = "modp2048s224";
break;
case '24':
$convertion = "modp2048s256";
break;
}
return $convertion;

View File

@ -410,6 +410,9 @@ $( document ).ready(function() {
16 => '16 (4096 bits)',
17 => '17 (6144 bits)',
18 => '18 (8192 bits)',
19 => '19 (256 bit elliptic curve)',
20 => '20 (384 bit elliptic curve)',
21 => '21 (521 bit elliptic curve)',
22 => '22 (1024(sub 160) bits)',
23 => '23 (2048(sub 224) bits)',
24 => '24 (2048(sub 256) bits)'

View File

@ -128,7 +128,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig['authentication_method'] = "pre_shared_key";
$pconfig['encryption-algorithm'] = array("name" => "3des") ;
$pconfig['hash-algorithm'] = "sha1";
$pconfig['dhgroup'] = "2";
$pconfig['dhgroup'] = "24";
$pconfig['lifetime'] = "28800";
$pconfig['nat_traversal'] = "on";
$pconfig['iketype'] = "ikev1";
@ -951,6 +951,9 @@ endforeach; ?>
16 => '16 (4096 bit)',
17 => '17 (6144 bit)',
18 => '18 (8192 bit)',
19 => '19 (256 bit elliptic curve)',
20 => '20 (384 bit elliptic curve)',
21 => '21 (521 bit elliptic curve)',
22 => '22 (1024(sub 160) bit)',
23 => '23 (2048(sub 224) bit)',
24 => '24 (2048(sub 256) bit)'