valet
valet copied to clipboard
Trust CA Certificate only
As a follow-up to #1461, this PR changes the certificate trust logic only to need to trust the LaravelValetCASelfSigned.pem
certificate. Since all site certificates are generated from this CA, trusting the CA makes trusting the site certificate redundant.
I noticed my LaravelValetCASelfSigned.pem
was not trusted on my system, so I added a check for that anytime secure
is called to ensure the root CA is trusted.
This will make sure the sudo call to add an entry to the system keychain is called at most once when calling the renew command. Once the CA is trusted, there will be no need to authenticate when calling secure
or renew
commands.
I left the unsecure
command alone since it won't hurt to clean up old certificates if needed.