Skip to content

Instantly share code, notes, and snippets.

@ewalk153
Created September 21, 2015 01:12
Show Gist options
  • Save ewalk153/2db072d1aeef6c369984 to your computer and use it in GitHub Desktop.
Save ewalk153/2db072d1aeef6c369984 to your computer and use it in GitHub Desktop.
Setup command to generate X509 keys for Xero.
[ req ]
prompt = no
default_bits = 2048
default_keyfile = flatbook.co.key
encrypt_key = no
distinguished_name = req_distinguished_name
#string_mask = utf8only
#req_extensions = v3_req
[ req_distinguished_name ]
O=Flatbook Corp
L=Montreal
ST=Quebec
C=CA
CN=flatboook.co
[ v3_req ]
#basicConstraints = CA:FALSE
#keyUsage = nonRepudiation, digitalSignature, keyEncipherment
#Issuer: O=Internet Widgits Pty Ltd, L=Grand Rapids, ST=Michigan, C=US, CN=www.example.com
openssl genrsa -out privatekey.pem 1024
openssl req -newkey rsa:1024 -x509 -key privatekey.pem -out publickey.cer -days 365 -config ca.conf
openssl pkcs12 -export -out public_privatekey.pfx -inkey privatekey.pem -in publickey.cer
openssl x509 -in publickey.cer -text
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment