VPN: OpenVPN: Instances - only complain about a missing linked CA when none is being offered otherwise, if we're not going to use the attached CA, it should also be safe to ignore it.

This commit is contained in:
Ad Schellevis 2024-04-05 19:05:45 +02:00
parent b53fe7c1d9
commit 3f5d7f0779

View File

@ -136,7 +136,7 @@ class OpenVPN extends BaseModel
}
if (!empty((string)$instance->cert)) {
$tmp = Store::getCertificate((string)$instance->cert);
if (empty($tmp) || !isset($tmp['ca'])) {
if (empty((string)$instance->ca) && (empty($tmp) || !isset($tmp['ca']))) {
$messages->appendMessage(new Message(
gettext('Unable to locate a CA for this certificate.'),
$key . ".cert"