Skip to content

Instantly share code, notes, and snippets.

@lawrence-laz
Last active November 6, 2023 10:24
Show Gist options
  • Save lawrence-laz/30ee21dc8f886364a990028eb1b936d8 to your computer and use it in GitHub Desktop.
Save lawrence-laz/30ee21dc8f886364a990028eb1b936d8 to your computer and use it in GitHub Desktop.
Generate public/private keys and self signed pfx using opensll
# If .pem
openssl genrsa -out private-key.pem 3072
openssl rsa -in private-key.pem -pubout -out public-key.pem
# If .pfx
openssl genrsa -out private.key 1024
openssl req -new -x509 -key private.key -out publickey.cer -days 365
winpty openssl pkcs12 -export -out public-private-key.pfx -inkey private.key -in publickey.cer
# For signing .dll
signtool.exe sign /tr http://timestamp.digicert.com /fd sha256 /td sha256 /sm /f "public-private-key.pfx" /p verygoodpassword /d "Descriptions of the software" YourCompany.*.dll
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment