Skip to content

Instantly share code, notes, and snippets.

@chobijaeyu
Created October 12, 2019 04:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chobijaeyu/d115ce673cacd0bf6a7538d00626d8ab to your computer and use it in GitHub Desktop.
Save chobijaeyu/d115ce673cacd0bf6a7538d00626d8ab to your computer and use it in GitHub Desktop.
https://stackoverflow.com/a/58210221
0
Here is a very simple way to create an IP certificate that Chrome will trust.
The ssl.conf file...
[ req ]
default_bits = 4096
distinguished_name = req_distinguished_name
req_extensions = req_ext
prompt = no
[ req_distinguished_name ]
commonName = 192.168.1.10
[ req_ext ]
subjectAltName = IP:192.168.1.10
Where, of course 192.168.1.10 is the local network IP we want Chrome to trust.
Create the certificate:
openssl genrsa -out key1.pem
openssl req -new -key key1.pem -out csr1.pem -config ssl.conf
openssl x509 -req -days 9999 -in csr1.pem -signkey key1.pem -out cert1.pem -extensions req_ext -extfile ssl.conf
rm csr1.pem
On Windows import the certificate into the Trusted Root Certificate Store on all client machines. On Android Phone or Tablet download the certificate to install it. Now Chrome will trust the certificate on windows and Android.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment