mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 08:40:09 +01:00
store CA in separate directory
This commit is contained in:
committed by
GitHub
parent
a2d446b871
commit
3f11288920
@@ -183,6 +183,8 @@ function secure($url)
|
||||
{
|
||||
$this->unsecure($url);
|
||||
|
||||
$this->files->ensureDirExists($this->caPath(), user());
|
||||
|
||||
$this->files->ensureDirExists($this->certificatesPath(), user());
|
||||
|
||||
$this->createCa();
|
||||
@@ -203,9 +205,9 @@ function secure($url)
|
||||
*/
|
||||
function createCa()
|
||||
{
|
||||
$caPemPath = $this->certificatesPath().'/LaravelValetCASelfSigned.pem';
|
||||
$caKeyPath = $this->certificatesPath().'/LaravelValetCASelfSigned.key';
|
||||
$caAffixPath = $this->certificatesPath().'/LaravelValetCASelfSigned.affix';
|
||||
$caPemPath = $this->caPath().'/LaravelValetCASelfSigned.pem';
|
||||
$caKeyPath = $this->caPath().'/LaravelValetCASelfSigned.key';
|
||||
$caAffixPath = $this->caPath().'/LaravelValetCASelfSigned.affix';
|
||||
|
||||
if ($this->files->exists($caKeyPath) && $this->files->exists($caPemPath) && $this->files->exists($caAffixPath)) {
|
||||
return;
|
||||
@@ -254,9 +256,9 @@ function createCa()
|
||||
*/
|
||||
function createCertificate($url)
|
||||
{
|
||||
$caPemPath = $this->certificatesPath().'/LaravelValetCASelfSigned.pem';
|
||||
$caKeyPath = $this->certificatesPath().'/LaravelValetCASelfSigned.key';
|
||||
$caSrlPath = $this->certificatesPath().'/LaravelValetCASelfSigned.srl';
|
||||
$caPemPath = $this->caPath().'/LaravelValetCASelfSigned.pem';
|
||||
$caKeyPath = $this->caPath().'/LaravelValetCASelfSigned.key';
|
||||
$caSrlPath = $this->caPath().'/LaravelValetCASelfSigned.srl';
|
||||
$keyPath = $this->certificatesPath().'/'.$url.'.key';
|
||||
$csrPath = $this->certificatesPath().'/'.$url.'.csr';
|
||||
$crtPath = $this->certificatesPath().'/'.$url.'.crt';
|
||||
@@ -390,6 +392,16 @@ function sitesPath()
|
||||
return VALET_HOME_PATH.'/Sites';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the path to the Valet CA certificates.
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
function caPath()
|
||||
{
|
||||
return VALET_HOME_PATH.'/CA';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the path to the Valet TLS certificates.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user