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

freeradius: show ECDSA CAs and certs only with correct curves #710

Merged
merged 4 commits into from
Nov 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion net/pfSense-pkg-freeradius3/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

PORTNAME= pfSense-pkg-freeradius3
PORTVERSION= 0.15.7
PORTREVISION= 3
PORTREVISION= 4
CATEGORIES= net
MASTER_SITES= # empty
DISTFILES= # empty
Expand Down
36 changes: 11 additions & 25 deletions net/pfSense-pkg-freeradius3/files/usr/local/pkg/freeradius.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1601,18 +1601,18 @@ EOD;
}
}

/* This change cannot be pulled back to RELENG_2_4_4 since it would break there.
* see https://redmine.pfsense.org/issues/9897
*/
// Gets started from freeradiuseapconf.xml
function freeradius_get_ca_certs() {
global $config;
$ca_arr = array();
$ca_arr[] = array('refid' => 'none', 'descr' => 'none (auto)');

if (is_array($config['ca'])) {
foreach ($config['ca'] as $ca) {
$ca_arr[] = array('refid' => $ca['refid'], 'descr' => $ca['descr']);
}
}
return $ca_arr;
function freeradius_get_ca_or_certs($type) {
$c_arr = array();
$c_arr[] = array('refid' => 'none', 'descr' => 'none (auto)');
$ecdsagood = cert_build_list($type, 'IPsec');
foreach ($ecdsagood as $refid => $descr) {
$c_arr[] = array('refid' => $refid, 'descr' => $descr);
}
return $c_arr;
}

// Gets started from freeradiuseapconf.xml
Expand All @@ -1629,20 +1629,6 @@ function freeradius_get_ca_crl() {
return $crl_arr;
}

// Gets started from freeradiuseapconf.xml
function freeradius_get_server_certs() {
global $config;
$cert_arr = array();
$cert_arr[] = array('refid' => 'none', 'descr' => 'none (auto)');

if (is_array($config['cert'])) {
foreach ($config['cert'] as $cert) {
$cert_arr[] = array('refid' => $cert['refid'], 'descr' => $cert['descr']);
}
}
return $cert_arr;
}

function freeradius_sqlconf_resync() {
global $config;
$conf = '';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@
]]>
</description>
<type>select_source</type>
<source><![CDATA[freeradius_get_ca_certs()]]></source>
<source><![CDATA[freeradius_get_ca_or_certs('ca')]]></source>
<source_name>descr</source_name>
<source_value>refid</source_value>
</field>
Expand Down Expand Up @@ -222,7 +222,7 @@
]]>
</description>
<type>select_source</type>
<source><![CDATA[freeradius_get_server_certs()]]></source>
<source><![CDATA[freeradius_get_ca_or_certs('cert')]]></source>
<source_name>descr</source_name>
<source_value>refid</source_value>
</field>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@
]]>
</description>
<type>select_source</type>
<source><![CDATA[freeradius_get_ca_certs()]]></source>
<source><![CDATA[freeradius_get_ca_or_certs('ca')]]></source>
<source_name>descr</source_name>
<source_value>refid</source_value>
</field>
Expand All @@ -513,7 +513,7 @@
]]>
</description>
<type>select_source</type>
<source><![CDATA[freeradius_get_server_certs()]]></source>
<source><![CDATA[freeradius_get_ca_or_certs('cert')]]></source>
<source_name>descr</source_name>
<source_value>refid</source_value>
</field>
Expand Down