Skip to content

Instantly share code, notes, and snippets.

@sbmueller
Created February 10, 2019 11:38
Show Gist options
  • Save sbmueller/e4c727d74b47cb9d3598b2ae3d25a184 to your computer and use it in GitHub Desktop.
Save sbmueller/e4c727d74b47cb9d3598b2ae3d25a184 to your computer and use it in GitHub Desktop.
Create SSL root certificate for Fritz!Box
#!/bin/sh
# solution found at
# https://github.com/webpack/webpack-dev-server/issues/854
# replace [IP] with the correct ip address
# assumes you have macports openssl installed. Alter -config path if needed.
openssl req \
-newkey rsa:2048 \
-x509 \
-nodes \
-keyout server.pem \
-new \
-out server.pem \
-subj /CN=[IP] \
-reqexts SAN \
-extensions SAN \
-config <(cat /opt/local/etc/openssl/openssl.cnf \
<(printf '[SAN]\nsubjectAltName=IP:[IP]')) \
-sha256 \
-days 3650
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment