Skip to content

Instantly share code, notes, and snippets.

@jordansissel
Last active February 11, 2021 04:56
Show Gist options
  • Save jordansissel/3741723 to your computer and use it in GitHub Desktop.
Save jordansissel/3741723 to your computer and use it in GitHub Desktop.
OpenSSL quick. (generate certs, run server/clients)
# Create a self-signed cert
openssl req -x509 -batch -nodes -newkey rsa:2048 -keyout lumberjack.key -out lumberjack.crt
# Create a self-signed with DNS SAN
openssl req -x509 -nodes -new -subj "/CN=localhost" -addext "subjectAltName = DNS:localhost" -newkey rsa:2048 -keyout
/tmp/server.key -out /tmp/server.crt
# Run a server
openssl s_server -accept 3333 -cert lumberjack.crt -key lumberjack.key
# Run a client
openssl s_client -connect localhost:3333 -cert lumberjack.crt -key lumberjack.key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment