VPN/OpenVPN/Client Export - fix openssl_pkcs12_export(): Passing null to parameter #4 ($passphrase) of type string is deprecated

This commit is contained in:
Ad Schellevis 2023-02-21 15:39:41 +01:00
parent bf97cdfc87
commit e7007a42a2
2 changed files with 4 additions and 4 deletions

View File

@ -80,8 +80,8 @@ class ArchiveOpenVPN extends PlainOpenVPN
$p12 = $this->export_pkcs12(
$this->config['client_crt'],
$this->config['client_prv'],
!empty($this->config['p12_password']) ? $this->config['p12_password'] : null,
!empty($this->config['server_ca_chain']) ? $this->config['server_ca_chain'] : null
!empty($this->config['p12_password']) ? $this->config['p12_password'] : '',
!empty($this->config['server_ca_chain']) ? $this->config['server_ca_chain'] : ''
);
file_put_contents("{$content_dir}/{$base_filename}.p12", $p12);

View File

@ -114,8 +114,8 @@ class ViscosityVisz extends PlainOpenVPN
$p12 = $this->export_pkcs12(
$this->config['client_crt'],
$this->config['client_prv'],
!empty($this->config['p12_password']) ? $this->config['p12_password'] : null,
!empty($this->config['server_ca_chain']) ? $this->config['server_ca_chain'] : null
!empty($this->config['p12_password']) ? $this->config['p12_password'] : '',
!empty($this->config['server_ca_chain']) ? $this->config['server_ca_chain'] : ''
);
file_put_contents("{$content_dir}/pkcs.p12", $p12);