Skip to content

Instantly share code, notes, and snippets.

@maximkott
Last active August 26, 2015 08:28
Show Gist options
  • Save maximkott/45af53b0e7dcd122acc3 to your computer and use it in GitHub Desktop.
Save maximkott/45af53b0e7dcd122acc3 to your computer and use it in GitHub Desktop.

Revisions

  1. maximkott revised this gist Aug 26, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions create_cert.sh
    Original file line number Diff line number Diff line change
    @@ -4,3 +4,5 @@ sudo openssl req -new -key example.key -out example.csr
    # or

    sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout example.key -out example.crt

    # https://www.digitalocean.com/community/tutorials/how-to-create-an-ssl-certificate-on-nginx-for-ubuntu-14-04
  2. maximkott revised this gist Aug 26, 2015. 1 changed file with 6 additions and 5 deletions.
    11 changes: 6 additions & 5 deletions create_cert.sh
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,6 @@
    openssl genrsa 2048 > host.key
    openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert
    openssl x509 -noout -fingerprint -text < host.cert > host.info
    cat host.cert host.key > host.pem
    chmod 400 host.key host.pem
    sudo openssl genrsa -out example.key 2048
    sudo openssl req -new -key example.key -out example.csr

    # or

    sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout example.key -out example.crt
  3. maximkott renamed this gist Aug 26, 2015. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  4. maximkott renamed this gist Aug 26, 2015. 1 changed file with 0 additions and 1 deletion.
    1 change: 0 additions & 1 deletion gistfile1.txt → create_cert.bash
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,5 @@
    openssl genrsa 2048 > host.key
    openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert
    #[enter *.domain.com for the Common Name]
    openssl x509 -noout -fingerprint -text < host.cert > host.info
    cat host.cert host.key > host.pem
    chmod 400 host.key host.pem
  5. maximkott created this gist Aug 26, 2015.
    6 changes: 6 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    openssl genrsa 2048 > host.key
    openssl req -new -x509 -nodes -sha1 -days 3650 -key host.key > host.cert
    #[enter *.domain.com for the Common Name]
    openssl x509 -noout -fingerprint -text < host.cert > host.info
    cat host.cert host.key > host.pem
    chmod 400 host.key host.pem