Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow manual selection of IPsec IKE Pseudo-Random Function (PRF). Issue #9309 #4106

Merged
merged 1 commit into from Feb 7, 2020

Conversation

vktg
Copy link
Contributor

@vktg vktg commented Oct 25, 2019

default (current) behavior if checkbox disabled
pfSense <-> Cisco IOS tunnel tested

Copy link
Contributor

@jim-p jim-p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK, but needs some slight wording changes, and testing.

@@ -944,6 +969,13 @@ function build_eal_list() {
$pconfig['splitconn']
));

$section->addInput(new Form_Checkbox(
'prfselect_enable',
'Allow select PRF',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would label this PRF Selection

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

$section->addInput(new Form_Checkbox(
'prfselect_enable',
'Allow select PRF',
'Enable this to manually select pseudo-random function (PRF). In most cases this is not required.',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use this instead: Enable manual Pseudo-Random Function (PRF) selection

And then add a setHelp() with: Manual PRF selection is typically not required, but can be useful in combination with AEAD Encryption Algorithms such as AES-GCM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@vktg
Copy link
Contributor Author

vktg commented Dec 5, 2019

pfSense 2.5.0.a.20191203.0148

  • successfully tested different combinations of encryption algos and MD5, SHA1/256/348/512 hash/prfs on IPsec tunnel with Cisco vIOS 15.5,
  • and different combinations of encryption algos and AES_XCBC hash/prf on IPsec tunnel with two pfSense 2.5

Copy link
Contributor

@jim-p jim-p left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This now has conflicts that must be resolved. Please review the significant changes made to IPsec for https://redmine.pfsense.org/issues/9603 before attempting to resolve the conflicts.

@vktg
Copy link
Contributor Author

vktg commented Dec 7, 2019

conflicts resolved
tested with Cisco IOS

@@ -1895,7 +1899,7 @@ function ipsec_setup_proposal_entry(& $ph2ent, & $algo_arr, $ealg_id, $keylen) {
/* If multiple hash algorithms are present, loop through and add them all. */
if (!empty($ph2ent['hash-algorithm-option']) && is_array($ph2ent['hash-algorithm-option'])) {
foreach ($ph2ent['hash-algorithm-option'] as $halgo) {
$proposal[] = ipsec_setup_proposal_algo($ealg_id, $keylen, $halgo, $ph2ent['pfsgroup']);
$proposal[] = ipsec_setup_proposal_algo($ealg_id, $keylen, $halgo, False, $ph2ent['pfsgroup']);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should either be false or FALSE, preferably false since that's what is used elsewhere in the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -2013,9 +2017,13 @@ function ipsec_setup_tunnels() {
empty($p1enc['hash-algorithm'])) {
continue;
}
if ($ph1ent['prfselect_enable'] != 'yes') {
$p1enc['prf-algorithm'] = False;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should either be false or FALSE, preferably false since that's what is used elsewhere in the file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@rbgarga rbgarga requested a review from jim-p December 10, 2019 13:02
@rbgarga
Copy link
Member

rbgarga commented Dec 20, 2019

@vktg please rebase your fork to fix conflicts. While there, could you please squash all these commits in a single one to make the commit history cleaner?

@vktg
Copy link
Contributor Author

vktg commented Dec 20, 2019

all done

@rbgarga rbgarga removed the Conflicts label Dec 20, 2019
@vktg vktg changed the title Allow manual selection of IPsec IKE Pseudo-Random Function (PRF) Allow manual selection of IPsec IKE Pseudo-Random Function (PRF). Issue #9309 Jan 16, 2020
@rbgarga
Copy link
Member

rbgarga commented Jan 17, 2020

@vktg please rebase your fork and resolve conflicts again

@vktg
Copy link
Contributor Author

vktg commented Feb 7, 2020

Successfully tested:
2.5.0.a.20200206.2005 < - > Cisco IOS 15.5(3)M
2.5.0.a.20200206.2005 < - > Huawei USG6000V (VRP 5.160)

@netgate-git-updates netgate-git-updates merged commit f5ddbec into pfsense:master Feb 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants