Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpnSense
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
OpnSense
Commits
4638d99c
Commit
4638d99c
authored
Jul 12, 2016
by
Ad Schellevis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(ipsec) add eap-mschapv2
parent
1e2ace87
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
11 deletions
+21
-11
ipsec.inc
src/etc/inc/ipsec.inc
+4
-0
vpn_ipsec_phase1.php
src/www/vpn_ipsec_phase1.php
+17
-11
No files found.
src/etc/inc/ipsec.inc
View file @
4638d99c
...
...
@@ -957,6 +957,10 @@ EOD;
case
'rsasig'
:
$authentication
=
"leftauth = pubkey
\n\t
rightauth = pubkey"
;
break
;
case
'eap-mschapv2'
:
$authentication
=
"leftauth = pubkey
\n\t
rightauth = eap-mschapv2"
;
$authentication
.=
"
\n\t
eap_identity=%any"
;
break
;
case
'hybrid_rsa_server'
:
$authentication
=
"leftauth = xauth-generic
\n\t
rightauth = pubkey"
;
$authentication
.=
"
\n\t
rightauth2 = xauth"
;
...
...
src/www/vpn_ipsec_phase1.php
View file @
4638d99c
...
...
@@ -156,12 +156,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
$pconfig
=
$_POST
;
$old_ph1ent
=
$a_phase1
[
$p1index
];
// Preperations to kill some settings which aren't left empty by the field.
// Unset ca and cert if not required to avoid storing in config
if
(
$pconfig
[
'authentication_method'
]
==
"pre_shared_key"
||
$pconfig
[
'authentication_method'
]
==
"xauth_psk_server"
)
{
unset
(
$pconfig
[
'caref'
]);
unset
(
$pconfig
[
'certref'
]);
}
// unset dpd on post
if
(
!
isset
(
$pconfig
[
'dpd_enable'
]))
{
unset
(
$pconfig
[
'dpd_delay'
]);
...
...
@@ -184,10 +178,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'GET') {
// For RSA methods, require the CA/Cert.
switch
(
$method
)
{
case
"eap-tls"
:
if
(
$pconfig
[
'iketype'
]
!=
'ikev2'
)
{
$input_errors
[]
=
gettext
(
"EAP-TLS can only be used with IKEv2 type VPNs."
);
}
break
;
case
'eap-mschapv2'
:
if
(
$pconfig
[
'iketype'
]
!=
'ikev2'
)
{
$input_errors
[]
=
sprintf
(
gettext
(
"%s can only be used with IKEv2 type VPNs."
),
strtoupper
(
$method
));
}
break
;
case
"pre_shared_key"
:
// If this is a mobile PSK tunnel the user PSKs go on
// the PSK tab, not here, so skip the check.
...
...
@@ -448,20 +443,30 @@ include("head.inc");
$
(
"
#authentication_method
"
).
change
(
function
(){
$
(
"
.auth_opt
"
).
hide
();
$
(
"
.auth_opt select,input
"
).
prop
(
"
disabled
"
,
true
);
switch
(
$
(
"
#authentication_method
"
).
val
())
{
case
'
eap-mschapv2
'
:
$
(
"
.auth_eap_tls
"
).
show
();
$
(
"
.auth_eap_tls select,input
"
).
prop
(
"
disabled
"
,
false
);
break
;
case
'
eap-tls
'
:
case
'
hybrid_rsa_server
'
:
case
'
xauth_rsa_server
'
:
case
'
rsasig
'
:
$
(
"
.auth_eap_tls
"
).
show
();
$
(
"
.auth_eap_tls select,input
"
).
prop
(
"
disabled
"
,
false
);
$
(
"
.auth_eap_tls_caref
"
).
show
();
$
(
"
.auth_eap_tls_caref select,input
"
).
prop
(
"
disabled
"
,
false
);
break
;
case
'
pre_shared_key
'
:
if
(
$
(
"
#mobile
"
).
val
()
==
undefined
)
{
$
(
"
.auth_psk
"
).
show
();
$
(
"
.auth_psk select,input
"
).
prop
(
"
disabled
"
,
false
);
}
break
;
default
:
/* psk modes*/
$
(
"
.auth_psk
"
).
show
();
$
(
"
.auth_psk select,input
"
).
prop
(
"
disabled
"
,
false
);
break
;
}
});
...
...
@@ -666,6 +671,7 @@ include("head.inc");
'xauth_rsa_server'
=>
array
(
'name'
=>
'Mutual RSA + Xauth'
,
'mobile'
=>
true
),
'xauth_psk_server'
=>
array
(
'name'
=>
'Mutual PSK + Xauth'
,
'mobile'
=>
true
),
'eap-tls'
=>
array
(
'name'
=>
'EAP-TLS'
,
'mobile'
=>
true
),
'eap-mschapv2'
=>
array
(
'name'
=>
'EAP-MSCHAPV2'
,
'mobile'
=>
true
),
'rsasig'
=>
array
(
'name'
=>
'Mutual RSA'
,
'mobile'
=>
false
),
'pre_shared_key'
=>
array
(
'name'
=>
'Mutual PSK'
,
'mobile'
=>
false
)
);
foreach
(
$p1_authentication_methods
as
$method_type
=>
$method_params
)
:
...
...
@@ -792,7 +798,7 @@ endforeach; ?>
</div>
</td>
</tr>
<tr
class=
"auth_opt auth_eap_tls"
>
<tr
class=
"auth_opt auth_eap_tls
_caref
"
>
<td><a
id=
"help_for_caref"
href=
"#"
class=
"showhelp"
><i
class=
"fa fa-info-circle"
></i></a>
<?=
gettext
(
"My Certificate Authority"
);
?>
</td>
<td>
<select
name=
"caref"
class=
"formselect"
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment