Skip to content

Commit

Permalink
Merge pull request #710 from vktg/freeradiusecdsa
Browse files Browse the repository at this point in the history
  • Loading branch information
rbgarga committed Nov 25, 2019
2 parents 1bdb4e5 + e4c1b63 commit 946f638
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 30 deletions.
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

0 comments on commit 946f638

Please sign in to comment.