Skip to content

Instantly share code, notes, and snippets.

@tekguy
Last active August 29, 2015 14:03
Show Gist options
  • Save tekguy/af2f51792cd982811594 to your computer and use it in GitHub Desktop.
Save tekguy/af2f51792cd982811594 to your computer and use it in GitHub Desktop.
Generate cert and private key then merge using p12
# Generate Cert and Key in seperate file
# Provide the .cert to the end user
openssl req -new -newkey rsa:1024 -days 365 -nodes -x509 -keyout QA.key -out QA.cert
# Merge cert and private key to make a p12 file, this file will be used by .NET's X509Certificate2 class, The private key will be accessible via the "PrivateKey" property
openssl pkcs12 -export -in qa.cert -inkey qa.key -out qa.p12 -name "QA"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment