Skip to content

Instantly share code, notes, and snippets.

@Grobix
Forked from mxlje/ssl.md
Last active August 29, 2015 14:26
Show Gist options
  • Save Grobix/e304b6b299660d2d70dd to your computer and use it in GitHub Desktop.
Save Grobix/e304b6b299660d2d70dd to your computer and use it in GitHub Desktop.

Revisions

  1. @mxlje mxlje revised this gist Jul 30, 2015. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion ssl.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,12 @@
    These commands are needed every time you want to generate a new certificate
    signing request to give to an authority in order for them to generate and sign
    a certificate for you. Good info on https://www.h2check.org/deploy
    a certificate for you.

    I constantly forget how this stuff works so I collected the most important ones
    here for easy copy & paste.

    There is good information available on https://www.h2check.org/deploy, and they
    also go into detail on HTTP/2.

    ## Generate new private key

  2. @mxlje mxlje revised this gist Jul 30, 2015. 1 changed file with 10 additions and 0 deletions.
    10 changes: 10 additions & 0 deletions ssl.md
    Original file line number Diff line number Diff line change
    @@ -37,3 +37,13 @@ http://blog.ivanristic.com/2013/06/ssl-labs-deploying-forward-secrecy.html
    ```shell
    $ openssl dhparam -out dhparam.pem 2048
    ```

    ## Self signed cert

    Use this to test SSL config on localhost but realize that *these certs will not be trusted by browsers*.

    ```shell
    $ openssl req -x509 -newkey rsa:2048 -keyout example.com.key -out example.com.crt -days 365 -nodes
    ```

    `-nodes` means that the private key will be unencrypted.
  3. @mxlje mxlje revised this gist Jul 30, 2015. 1 changed file with 2 additions and 0 deletions.
    2 changes: 2 additions & 0 deletions ssl.md
    Original file line number Diff line number Diff line change
    @@ -32,6 +32,8 @@ $ openssl req -noout -text -in example.com.csr

    ## Diffie-Hellman paratemers

    http://blog.ivanristic.com/2013/06/ssl-labs-deploying-forward-secrecy.html

    ```shell
    $ openssl dhparam -out dhparam.pem 2048
    ```
  4. @mxlje mxlje revised this gist Jul 30, 2015. 1 changed file with 11 additions and 5 deletions.
    16 changes: 11 additions & 5 deletions ssl.md
    Original file line number Diff line number Diff line change
    @@ -1,31 +1,37 @@
    These commands are needed every time you want to generate a new certificate
    signing request to give to an authority in order for them to generate and sign
    a certificate for you. https://www.h2check.org/deploy
    a certificate for you. Good info on https://www.h2check.org/deploy

    # Generate new private key
    ## Generate new private key

    This is **unencrypted and must be kept private**.

    ```shell
    $ openssl genrsa -out example.com.key 2048
    ```

    # Generate Certificate Signing Request (CSR) using the private key
    ## Generate Certificate Signing Request (CSR) using the private key

    ```shell
    $ openssl req -new -sha256 -key example.com.key -out example.com.csr
    ```

    # Single command
    ## Single command

    ```shell
    $ openssl req -new -newkey rsa:2048 -nodes -keyout example.com.key -out example.com.csr
    ```

    # Check a CSR
    ## Check a CSR

    This allows you to check the information enclosed in a CSR.

    ```shell
    $ openssl req -noout -text -in example.com.csr
    ```

    ## Diffie-Hellman paratemers

    ```shell
    $ openssl dhparam -out dhparam.pem 2048
    ```
  5. @mxlje mxlje revised this gist Jun 19, 2015. 1 changed file with 1 addition and 3 deletions.
    4 changes: 1 addition & 3 deletions ssl.md
    Original file line number Diff line number Diff line change
    @@ -1,6 +1,6 @@
    These commands are needed every time you want to generate a new certificate
    signing request to give to an authority in order for them to generate and sign
    a certificate for you.
    a certificate for you. https://www.h2check.org/deploy

    # Generate new private key

    @@ -29,5 +29,3 @@ This allows you to check the information enclosed in a CSR.
    ```shell
    $ openssl req -noout -text -in example.com.csr
    ```

    https://www.h2check.org/deploy
  6. @mxlje mxlje revised this gist Jun 19, 2015. 1 changed file with 6 additions and 4 deletions.
    10 changes: 6 additions & 4 deletions ssl.md
    Original file line number Diff line number Diff line change
    @@ -2,21 +2,21 @@ These commands are needed every time you want to generate a new certificate
    signing request to give to an authority in order for them to generate and sign
    a certificate for you.

    # generate new private key
    # Generate new private key

    This is **unencrypted and must be kept private**.

    ```shell
    $ openssl genrsa -out example.com.key 2048
    ```

    # generate Certificate Signing Request (CSR) using the private key
    # Generate Certificate Signing Request (CSR) using the private key

    ```shell
    $ openssl req -new -sha256 -key example.com.key -out example.com.csr
    ```

    # all in one command
    # Single command

    ```shell
    $ openssl req -new -newkey rsa:2048 -nodes -keyout example.com.key -out example.com.csr
    @@ -28,4 +28,6 @@ This allows you to check the information enclosed in a CSR.

    ```shell
    $ openssl req -noout -text -in example.com.csr
    ```
    ```

    https://www.h2check.org/deploy
  7. @mxlje mxlje revised this gist Jun 19, 2015. 1 changed file with 9 additions and 1 deletion.
    10 changes: 9 additions & 1 deletion ssl.md
    Original file line number Diff line number Diff line change
    @@ -1,5 +1,11 @@
    These commands are needed every time you want to generate a new certificate
    signing request to give to an authority in order for them to generate and sign
    a certificate for you.

    # generate new private key

    This is **unencrypted and must be kept private**.

    ```shell
    $ openssl genrsa -out example.com.key 2048
    ```
    @@ -10,14 +16,16 @@ $ openssl genrsa -out example.com.key 2048
    $ openssl req -new -sha256 -key example.com.key -out example.com.csr
    ```

    # all in one go
    # all in one command

    ```shell
    $ openssl req -new -newkey rsa:2048 -nodes -keyout example.com.key -out example.com.csr
    ```

    # Check a CSR

    This allows you to check the information enclosed in a CSR.

    ```shell
    $ openssl req -noout -text -in example.com.csr
    ```
  8. @mxlje mxlje created this gist Jun 19, 2015.
    23 changes: 23 additions & 0 deletions ssl.md
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,23 @@
    # generate new private key

    ```shell
    $ openssl genrsa -out example.com.key 2048
    ```

    # generate Certificate Signing Request (CSR) using the private key

    ```shell
    $ openssl req -new -sha256 -key example.com.key -out example.com.csr
    ```

    # all in one go

    ```shell
    $ openssl req -new -newkey rsa:2048 -nodes -keyout example.com.key -out example.com.csr
    ```

    # Check a CSR

    ```shell
    $ openssl req -noout -text -in example.com.csr
    ```