Skip to content

Commit

Permalink
Replace existing verify certificate method with new validate certific…
Browse files Browse the repository at this point in the history
…ate method for SSL certificate verification settings
  • Loading branch information
franklupo committed Apr 15, 2024
1 parent 0cdf09d commit fc39f3c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "corsinvest/cv4pve-api-php",
"description": "Corsinvest Proxmox VE Client API PHP",
"version": "8.1.3",
"version": "8.1.4",
"keywords": [
"Proxmox",
"Proxmox VE",
Expand Down
18 changes: 9 additions & 9 deletions src/PveClientBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class PveClientBase
/**
* @ignore
*/
private $verifyCertificate = false;
private $validateCertificate = false;

/**
* Client constructor.
Expand Down Expand Up @@ -188,25 +188,25 @@ public function getDebugLevel()
}

/**
* Sets the Verify Certificate
* Sets the Validate Certificate.
*
* @param bool $verifyCertificate
* @param bool $validateCertificate
* @return PveClientBase
*/
public function setVerifyCertificate($verifyCertificate)
public function setValidateCertificate($validateCertificate)
{
$this->verifyCertificate = $verifyCertificate;
$this->validateCertificate = $validateCertificate;
return $this;
}

/**
* Returns verify Certificate.
* Returns Validate Certificate.
*
* @return bool Verify Certificate.
*/
public function getVerifyCertificate()
public function getValidateCertificate()
{
return $this->verifyCertificate;
return $this->validateCertificate;
}

/**
Expand Down Expand Up @@ -397,7 +397,7 @@ private function executeAction($resource, $method, $parameters = [])
curl_setopt($prox_ch, CURLOPT_HEADER, true);
curl_setopt($prox_ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($prox_ch, CURLOPT_COOKIE, "PVEAuthCookie=" . $this->ticketPVEAuthCookie);
curl_setopt($prox_ch, CURLOPT_SSL_VERIFYPEER, $this->verifyCertificate);
curl_setopt($prox_ch, CURLOPT_SSL_VERIFYPEER, $this->validateCertificate);
curl_setopt($prox_ch, CURLOPT_SSL_VERIFYHOST, false);

if ($this->timeout != 0) {
Expand Down

0 comments on commit fc39f3c

Please sign in to comment.