Skip to content

Instantly share code, notes, and snippets.

@richardcurteis
Created November 18, 2021 11:30
Show Gist options
  • Save richardcurteis/cbd92a8c56782b2fa0cce85ecb93464d to your computer and use it in GitHub Desktop.
Save richardcurteis/cbd92a8c56782b2fa0cce85ecb93464d to your computer and use it in GitHub Desktop.

Revisions

  1. richardcurteis created this gist Nov 18, 2021.
    6 changes: 6 additions & 0 deletions generate.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,6 @@
    openssl genrsa -out ca.key 4096
    openssl req -new -x509 -days 365 -key ca.key -out ca.crt -addext 'extendedKeyUsage=1.3.6.1.5.5.7.3.4,1.3.6.1.5.5.7.3.2'
    openssl genrsa -out client.key 4096
    openssl req -new -key client.key -out client.csr
    # self-signed
    openssl x509 -req -days 365 -in client.csr -CA ca.crt -CAkey ca.key -set_serial 01 -out client.crt