"create-cert": "bash -c \"openssl req -new -newkey rsa:2048 -days 365 -nodes -x509 -keyout config/server.key -out config/server.crt -subj \"/C=US/ST=Nevada/L=test/O=test/OU=Software/CN=localhost\" -extensions san -config <(echo '[req]'; echo 'distinguished_name=req'; echo '[san]'; echo 'subjectAltName=DNS:localhost,IP:127.0.0.1') && sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain config/server.crt\"",
Last active
October 14, 2019 20:50
-
-
Save zackify/3deee3d6af7268f7edfef542ae6fab87 to your computer and use it in GitHub Desktop.
Create cert for webpack in one command, mac
Thanks! How did you even find this gist though? Haha
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For MacOS 10.15 Catalina, you may need that -config stanza to look like:
... because Apple added new requirements for SSL certs: https://support.apple.com/en-us/HT210176