Skip to content

Instantly share code, notes, and snippets.

@isstaif
Last active December 28, 2015 04:59

Revisions

  1. isstaif renamed this gist Nov 13, 2013. 1 changed file with 0 additions and 0 deletions.
    File renamed without changes.
  2. isstaif revised this gist Nov 13, 2013. No changes.
  3. isstaif created this gist Nov 13, 2013.
    11 changes: 11 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    #generate private key
    openssl genrsa -out private-key.pem 4096

    #generate signing request
    openssl req -new -key private-key.pem -out certificate-signing-request.pem

    #self sign the request (or send off the Verisign etc etc)
    openssl x509 -req -in certificate-signing-request.pem -signkey private-key.pem -out certificate.pem

    #extract public key out of the certificate
    openssl x509 -pubkey -noout -in certificate.pem > public-key.pem