macos localhost self signed certificate
cd /usr/local/etc/httpd/extra/cert
sudo openssl genrsa -out ./localhost.key 2048
sudo openssl rsa -in ./localhost.key -out ./localhost.key.rsa
sudo openssl req -new -key ./localhost.key.rsa -subj "/C=ar/ST=caba/L=caba/O=localhost/CN=localhost/" -out ./localhost.csr -config ./localhost.conf
sudo openssl x509 -req -extensions v3_req -days 365 -in ./localhost.csr -signkey ./localhost.key.rsa -out ./localhost.crt -extfile ./localhost.conf
sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain ./localhost.crt