Skip to content

Instantly share code, notes, and snippets.

@s4y
Created January 3, 2020 19:59
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 s4y/59c587c0d6ac5313fa6f47090c03baf5 to your computer and use it in GitHub Desktop.
Save s4y/59c587c0d6ac5313fa6f47090c03baf5 to your computer and use it in GitHub Desktop.
Generate a self-signed IP address certificate which can be installed on iOS by AirDropping cert.pem
# IP_ADDRESS_HERE -> 192.168…
openssl req -newkey rsa:2048 -nodes -keyout key.pem -x509 -days 365 -out cert.pem -reqexts SAN -extensions SAN -config <(cat /System/Library/OpenSSL/openssl.cnf <(printf '[SAN]\nsubjectAltName=IP:IP_ADDRESS_HERE\nextendedKeyUsage=serverAuth\nbasicConstraints=critical,CA:TRUE'))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment