mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-20 03:16:12 +00:00
mvc: style sweep
This commit is contained in:
parent
945bd66a3d
commit
0e63a68955
@ -36,7 +36,7 @@ use OPNsense\Core\Config;
|
||||
*/
|
||||
class Store
|
||||
{
|
||||
private static $issuer_map = [
|
||||
private static $issuer_map = [
|
||||
'L' => 'city',
|
||||
'ST' => 'state',
|
||||
'O' => 'organization',
|
||||
@ -150,7 +150,7 @@ class Store
|
||||
* @param array|null You can by options. See openssl_csr_new() for more information about options.
|
||||
* @return array containing generated certificate or returned errors
|
||||
*/
|
||||
private static function _signCert($csr, $caref, $lifetime, $options=null)
|
||||
private static function _signCert($csr, $caref, $lifetime, $options = null)
|
||||
{
|
||||
$ca = null;
|
||||
$ca_res_crt = null;
|
||||
@ -337,7 +337,7 @@ class Store
|
||||
}
|
||||
}
|
||||
foreach ($csr_subj as $key => $value) {
|
||||
$result['name'] .= ('/'.$key.'='.$value);
|
||||
$result['name'] .= ('/' . $key . '=' . $value);
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
||||
@ -44,15 +44,17 @@ class CertificateContainerField extends ContainerField
|
||||
public function dn()
|
||||
{
|
||||
$dn = [];
|
||||
foreach ([
|
||||
'country' => 'countryName',
|
||||
'state' => 'stateOrProvinceName',
|
||||
'city' => 'localityName',
|
||||
'organization' => 'organizationName',
|
||||
'organizationalunit' => 'organizationalUnitName',
|
||||
'email' => 'emailAddress',
|
||||
'commonname' => 'commonName',
|
||||
] as $source => $target) {
|
||||
foreach (
|
||||
[
|
||||
'country' => 'countryName',
|
||||
'state' => 'stateOrProvinceName',
|
||||
'city' => 'localityName',
|
||||
'organization' => 'organizationName',
|
||||
'organizationalunit' => 'organizationalUnitName',
|
||||
'email' => 'emailAddress',
|
||||
'commonname' => 'commonName',
|
||||
] as $source => $target
|
||||
) {
|
||||
if (!empty((string)$this->$source)) {
|
||||
$dn[$target] = (string)$this->$source;
|
||||
}
|
||||
@ -91,7 +93,6 @@ class CertificateContainerField extends ContainerField
|
||||
*/
|
||||
class CertificatesField extends ArrayField
|
||||
{
|
||||
|
||||
/**
|
||||
* @inheritDoc
|
||||
*/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user