From 62d4d9210f002b90fbc0efa49520cfa9a728960c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fl=C3=A1vio=20H=2E=20Ferreira?= Date: Mon, 9 Sep 2024 00:09:46 -0300 Subject: [PATCH] Update CustomHostnames.php add certificate_authority parameter for issue/update SSL custom hostname --- src/Endpoints/CustomHostnames.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Endpoints/CustomHostnames.php b/src/Endpoints/CustomHostnames.php index 7a0d2de3..0e6b5a14 100644 --- a/src/Endpoints/CustomHostnames.php +++ b/src/Endpoints/CustomHostnames.php @@ -74,6 +74,10 @@ public function addHostname( $options['ssl']['custom_certificate'] = $customSsl['certificate']; } + if (!empty($customSsl['certificate_authority'])) { + $options['ssl']['custom_certificate'] = $customSsl['certificate_authority']; + } + $zone = $this->adapter->post('zones/'.$zoneID.'/custom_hostnames', $options); $this->body = json_decode($zone->getBody()); return $this->body->result; @@ -199,6 +203,10 @@ public function updateHostname( $query['custom_certificate'] = $customSsl['certificate']; } + if (!empty($customSsl['certificate_authority'])) { + $query['custom_certificate'] = $customSsl['certificate_authority']; + } + if (!empty($query)) { $options = [ 'ssl' => $query