mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 08:40:09 +01:00
explicit CA serial for macOS 10.13.3
This commit is contained in:
committed by
GitHub
parent
192456d369
commit
9b543f4aa0
@@ -256,6 +256,7 @@ function createCertificate($url)
|
||||
{
|
||||
$caPemPath = $this->certificatesPath().'/LaravelValetCASelfSigned.pem';
|
||||
$caKeyPath = $this->certificatesPath().'/LaravelValetCASelfSigned.key';
|
||||
$caSrlPath = $this->certificatesPath().'/LaravelValetCASelfSigned.srl';
|
||||
$keyPath = $this->certificatesPath().'/'.$url.'.key';
|
||||
$csrPath = $this->certificatesPath().'/'.$url.'.csr';
|
||||
$crtPath = $this->certificatesPath().'/'.$url.'.crt';
|
||||
@@ -265,9 +266,14 @@ function createCertificate($url)
|
||||
$this->createPrivateKey($keyPath);
|
||||
$this->createSigningRequest($url, $keyPath, $csrPath, $confPath);
|
||||
|
||||
$caSrlParam = '-CAcreateserial ';
|
||||
if ($this->files->exists($caSrlPath)) {
|
||||
$caSrlParam = '-CAserial ' . $caSrlPath;
|
||||
}
|
||||
|
||||
$this->cli->runAsUser(sprintf(
|
||||
'openssl x509 -req -sha256 -days 730 -CA %s -CAkey %s -in %s -out %s -extensions v3_req -extfile %s',
|
||||
$caPemPath, $caKeyPath, $csrPath, $crtPath, $confPath
|
||||
'openssl x509 -req -sha256 -days 730 -CA %s -CAkey %s %s -in %s -out %s -extensions v3_req -extfile %s',
|
||||
$caPemPath, $caKeyPath, $caSrlParam, $csrPath, $crtPath, $confPath
|
||||
));
|
||||
|
||||
$this->trustCertificate($crtPath);
|
||||
|
||||
Reference in New Issue
Block a user