1
0
mirror of https://github.com/laravel/valet.git synced 2026-02-05 08:30:07 +01:00

Cater for filepaths with spaces

Fixes issue where certificates fail to be generated due to a space in the filepath
This commit is contained in:
David Connolly
2019-12-03 22:47:12 +00:00
committed by GitHub
parent 3d877ef803
commit 5cf4aea612

View File

@@ -365,7 +365,7 @@ function createCertificate($url)
$this->createPrivateKey($keyPath);
$this->createSigningRequest($url, $keyPath, $csrPath, $confPath);
$caSrlParam = '-CAserial ' . $caSrlPath;
$caSrlParam = '-CAserial "' . $caSrlPath . '"';
if (! $this->files->exists($caSrlPath)) {
$caSrlParam .= ' -CAcreateserial';
}
@@ -420,7 +420,7 @@ function createSigningRequest($url, $keyPath, $csrPath, $confPath)
function trustCa($caPemPath)
{
$this->cli->run(sprintf(
'sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain %s', $caPemPath
'sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain "%s"', $caPemPath
));
}
@@ -433,7 +433,7 @@ function trustCa($caPemPath)
function trustCertificate($crtPath)
{
$this->cli->run(sprintf(
'sudo security add-trusted-cert -d -r trustAsRoot -k /Library/Keychains/System.keychain %s', $crtPath
'sudo security add-trusted-cert -d -r trustAsRoot -k /Library/Keychains/System.keychain "%s"', $crtPath
));
}