1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-04 16:10:08 +01:00

Merge pull request #1463 from adrum/feature/trust-ca-cert

Trust CA Certificate only
This commit is contained in:
Matt Stauffer
2024-05-31 18:33:37 -04:00
committed by GitHub

View File

@@ -525,6 +525,14 @@ public function createCa(int $caExpireInDays): void
$caKeyPath = $this->caPath('LaravelValetCASelfSigned.key');
if ($this->files->exists($caKeyPath) && $this->files->exists($caPemPath)) {
$isTrusted = $this->cli->run(sprintf(
'security verify-cert -c "%s"', $caPemPath
));
if (strpos($isTrusted, '...certificate verification successful.') === false) {
$this->trustCa($caPemPath);
}
return;
}
@@ -607,8 +615,6 @@ public function createCertificate(string $url, int $caExpireInDays): void
$caExpireInDays, $caPemPath, $caKeyPath, $caSrlParam, $csrPath, $crtPath, $confPath
));
}
$this->trustCertificate($crtPath);
}
/**