mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Ticket #9308: Implement get_cert_country_codes() to get the list of country codes to be used by CAs and Certs
This commit is contained in:
parent
988640d363
commit
a56762ba30
@ -2790,6 +2790,25 @@ function get_country_name($country_code = "ALL") {
|
||||
return "";
|
||||
}
|
||||
|
||||
/* Return the list of country codes to be used on CAs and certs */
|
||||
function get_cert_country_codes() {
|
||||
$countries = get_country_name();
|
||||
|
||||
$country_codes = array();
|
||||
foreach ($countries as $country) {
|
||||
$country_codes[$country['code']] = $country['code'];
|
||||
}
|
||||
|
||||
/* Preserve historical order: None, US, CA, other countries */
|
||||
$first_items[''] = gettext("None");
|
||||
$first_items['US'] = $country_codes['US'];
|
||||
$first_items['CA'] = $country_codes['CA'];
|
||||
unset($country_codes['US']);
|
||||
unset($country_codes['CA']);
|
||||
|
||||
return array_merge($first_items, $country_codes);
|
||||
}
|
||||
|
||||
/* sort by interface only, retain the original order of rules that apply to
|
||||
the same interface */
|
||||
function filter_rules_sort() {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user