mirror of
https://github.com/laravel/valet.git
synced 2026-02-06 08:40:09 +01:00
unsecure also by trying to match cert email
This commit is contained in:
committed by
GitHub
parent
08d681f27b
commit
3af02dfba8
@@ -226,8 +226,8 @@ function createCa()
|
||||
));
|
||||
|
||||
$this->cli->runAsUser(sprintf(
|
||||
'openssl req -new -newkey rsa:2048 -days 730 -nodes -x509 -subj "/C=/ST=/O=%s/localityName=/commonName=%s/organizationalUnitName=Developers/emailAddress=noreply@valet.test/" -keyout %s -out %s',
|
||||
$oName, $cName, $caKeyPath, $caPemPath
|
||||
'openssl req -new -newkey rsa:2048 -days 730 -nodes -x509 -subj "/C=/ST=/O=%s/localityName=/commonName=%s/organizationalUnitName=Developers/emailAddress=%s/" -keyout %s -out %s',
|
||||
$oName, $cName, 'rootcertificate@laravel.valet', $caKeyPath, $caPemPath
|
||||
));
|
||||
$this->trustCa($caPemPath);
|
||||
}
|
||||
@@ -285,8 +285,8 @@ function createPrivateKey($keyPath)
|
||||
function createSigningRequest($url, $keyPath, $csrPath, $confPath)
|
||||
{
|
||||
$this->cli->runAsUser(sprintf(
|
||||
'openssl req -new -key %s -out %s -subj "/C=/ST=/O=/localityName=/commonName=%s/organizationalUnitName=/emailAddress=/" -config %s',
|
||||
$keyPath, $csrPath, $url, $confPath
|
||||
'openssl req -new -key %s -out %s -subj "/C=/ST=/O=/localityName=/commonName=%s/organizationalUnitName=/emailAddress=%s%s/" -config %s',
|
||||
$keyPath, $csrPath, $url, $url, '@laravel.valet', $confPath
|
||||
));
|
||||
}
|
||||
|
||||
@@ -363,6 +363,10 @@ function unsecure($url)
|
||||
|
||||
$this->cli->run(sprintf('sudo security delete-certificate -c "%s" /Library/Keychains/System.keychain', $url));
|
||||
$this->cli->run(sprintf('sudo security delete-certificate -c "*.%s" /Library/Keychains/System.keychain', $url));
|
||||
$this->cli->run(sprintf(
|
||||
'sudo security find-certificate -e "%s%s" -a -Z | grep SHA-1 | sudo awk \'{system("security delete-certificate -Z "$NF" /Library/Keychains/System.keychain")}\'',
|
||||
$url, '@laravel.valet'
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user