Skip to content

Instantly share code, notes, and snippets.

@jeremybeavon
Last active September 22, 2020 18:06
Show Gist options
  • Save jeremybeavon/7a73b58dab2c8efc7f70cf36ab921f2f to your computer and use it in GitHub Desktop.
Save jeremybeavon/7a73b58dab2c8efc7f70cf36ab921f2f to your computer and use it in GitHub Desktop.
Create self-signed certificate and with new CA
# Create CA
makecert -n "CN=MyCA" -r -sv MyCA.pvk MyCA.cer -b 12/01/2016 -e 01/02/2017
# Create IIS-Cert, signed by CA cert
makecert -pe -iv MyCA.pvk -n "CN=mymachinename" -eku 1.3.6.1.5.5.7.3.1 -ss my -sr localmachine -sky exchange -ic MyCA.cer IIS-mymachinename.cer -b 12/01/2016 -e 01/02/2017
# Create pfx file for the CA cert
pvk2pfx -pvk MyCA.pvk -pi MyCA -spc MyCA.cer -pfx MyCA.pfx -f
# Need to export the new key from the LocalMachine Personal certificates
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment