Skip to content

Instantly share code, notes, and snippets.

@lukaselmer
Forked from RandomEtc/1-make-key
Created August 26, 2014 20:07
Show Gist options
  • Save lukaselmer/2ad11f8a82c4870a4eb5 to your computer and use it in GitHub Desktop.
Save lukaselmer/2ad11f8a82c4870a4eb5 to your computer and use it in GitHub Desktop.

Revisions

  1. @RandomEtc RandomEtc revised this gist Sep 16, 2011. 7 changed files with 59 additions and 63 deletions.
    10 changes: 10 additions & 0 deletions 1-make-key
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,10 @@
    Key was generated using:

    tom% openssl genrsa -des3 -out example.com.key 2048
    Generating RSA private key, 2048 bit long modulus
    ....+++
    ..........................................................................................................................+++
    e is 65537 (0x10001)
    Enter pass phrase for example.com.key:
    Verifying - Enter pass phrase for example.com.key:
    %tom
    27 changes: 27 additions & 0 deletions 2-make-csr
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,27 @@
    CSR was generated using:

    tom% openssl req -new -key example.com.key -out example.com.csr
    Enter pass phrase for example.com.key:
    You are about to be asked to enter information that will be incorporated
    into your certificate request.
    What you are about to enter is what is called a Distinguished Name or a DN.
    There are quite a few fields but you can leave some blank
    For some fields there will be a default value,
    If you enter '.', the field will be left blank.
    -----
    Country Name (2 letter code) [AU]:US
    State or Province Name (full name) [Some-State]:California
    Locality Name (eg, city) []:San Francisco
    Organization Name (eg, company) [Internet Widgits Pty Ltd]:Example Company, Inc
    Organizational Unit Name (eg, section) []:
    Common Name (eg, YOUR name) []:example.com
    Email Address []:

    Please enter the following 'extra' attributes
    to be sent with your certificate request
    A challenge password []:
    An optional company name []:
    tom%

    CSR was pasted into RapidSSL form, phone tag and credit card transaction occurred, and example.com.crt and intermediate.crt were received by email from RapidSSL (after a short delay).

    6 changes: 6 additions & 0 deletions 3-unlock
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    Key was unlocked using:

    tom% openssl rsa -in example.com.key -out example.com.unlocked.key
    Enter pass phrase for example.com.key:
    writing RSA key
    tom%
    4 changes: 4 additions & 0 deletions 4-combine
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,4 @@
    PEM was generated using:

    tom% cat example.com.crt intermediate.crt > example.com.pem
    tom%
    5 changes: 5 additions & 0 deletions 5-upload
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    Cert was uploaded to heroku using:

    tom% heroku ssl:add example.com.pem example.com.unlocked.key --app example-app
    Added certificate to example.com, expiring in 2012/09/16 15:29:34 -0700
    tom%
    7 changes: 7 additions & 0 deletions 6-activate
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,7 @@
    SSL was activated for our app using:

    tom% heroku addons:add ssl:hostname --app example-app
    -----> Adding ssl:hostname to example-app... done, v44 ($20/mo)
    tom%

    And then the CNAME DNS was updated using the new alias that arrived by email.
    63 changes: 0 additions & 63 deletions SSL-Key-CSR.sh
    Original file line number Diff line number Diff line change
    @@ -1,63 +0,0 @@
    Key was generated using:

    tom% openssl genrsa -des3 -out example.com.key 2048
    Generating RSA private key, 2048 bit long modulus
    ....+++
    ..........................................................................................................................+++
    e is 65537 (0x10001)
    Enter pass phrase for example.com.key:
    Verifying - Enter pass phrase for example.com.key:
    %tom

    CSR was generated using:

    tom% openssl req -new -key example.com.key -out example.com.csr
    Enter pass phrase for example.com.key:
    You are about to be asked to enter information that will be incorporated
    into your certificate request.
    What you are about to enter is what is called a Distinguished Name or a DN.
    There are quite a few fields but you can leave some blank
    For some fields there will be a default value,
    If you enter '.', the field will be left blank.
    -----
    Country Name (2 letter code) [AU]:US
    State or Province Name (full name) [Some-State]:California
    Locality Name (eg, city) []:San Francisco
    Organization Name (eg, company) [Internet Widgits Pty Ltd]:Example Company, Inc
    Organizational Unit Name (eg, section) []:
    Common Name (eg, YOUR name) []:example.com
    Email Address []:

    Please enter the following 'extra' attributes
    to be sent with your certificate request
    A challenge password []:
    An optional company name []:
    tom%

    example.com.crt and intermediate.crt were received by email from RapidSSL (after a short delay).

    Key was unlocked using:

    tom% openssl rsa -in example.com.key -out example.com.unlocked.key
    Enter pass phrase for example.com.key:
    writing RSA key
    tom%

    PEM was generated using:

    tom% cat example.com.crt intermediate.crt > example.com.pem
    tom%

    Cert was uploaded to heroku using:

    tom% heroku ssl:add example.com.pem example.com.unlocked.key --app example-app
    Added certificate to example.com, expiring in 2012/09/16 15:29:34 -0700
    tom%

    SSL was activate for our app using:

    tom% heroku addons:add ssl:hostname --app example-app
    -----> Adding ssl:hostname to example-app... done, v44 ($20/mo)
    tom%

    And then the CNAME DNS was updated using the new alias that arrived by email.
  2. @RandomEtc RandomEtc created this gist Sep 16, 2011.
    63 changes: 63 additions & 0 deletions SSL-Key-CSR.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,63 @@
    Key was generated using:

    tom% openssl genrsa -des3 -out example.com.key 2048
    Generating RSA private key, 2048 bit long modulus
    ....+++
    ..........................................................................................................................+++
    e is 65537 (0x10001)
    Enter pass phrase for example.com.key:
    Verifying - Enter pass phrase for example.com.key:
    %tom

    CSR was generated using:

    tom% openssl req -new -key example.com.key -out example.com.csr
    Enter pass phrase for example.com.key:
    You are about to be asked to enter information that will be incorporated
    into your certificate request.
    What you are about to enter is what is called a Distinguished Name or a DN.
    There are quite a few fields but you can leave some blank
    For some fields there will be a default value,
    If you enter '.', the field will be left blank.
    -----
    Country Name (2 letter code) [AU]:US
    State or Province Name (full name) [Some-State]:California
    Locality Name (eg, city) []:San Francisco
    Organization Name (eg, company) [Internet Widgits Pty Ltd]:Example Company, Inc
    Organizational Unit Name (eg, section) []:
    Common Name (eg, YOUR name) []:example.com
    Email Address []:

    Please enter the following 'extra' attributes
    to be sent with your certificate request
    A challenge password []:
    An optional company name []:
    tom%

    example.com.crt and intermediate.crt were received by email from RapidSSL (after a short delay).

    Key was unlocked using:

    tom% openssl rsa -in example.com.key -out example.com.unlocked.key
    Enter pass phrase for example.com.key:
    writing RSA key
    tom%

    PEM was generated using:

    tom% cat example.com.crt intermediate.crt > example.com.pem
    tom%

    Cert was uploaded to heroku using:

    tom% heroku ssl:add example.com.pem example.com.unlocked.key --app example-app
    Added certificate to example.com, expiring in 2012/09/16 15:29:34 -0700
    tom%

    SSL was activate for our app using:

    tom% heroku addons:add ssl:hostname --app example-app
    -----> Adding ssl:hostname to example-app... done, v44 ($20/mo)
    tom%

    And then the CNAME DNS was updated using the new alias that arrived by email.