Skip to content

Instantly share code, notes, and snippets.

@Darksecond
Created October 4, 2012 09:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Darksecond/3832591 to your computer and use it in GitHub Desktop.
Save Darksecond/3832591 to your computer and use it in GitHub Desktop.
Openssl benchmark script
#!/bin/bash
echo Please make sure the server is running
echo the command is:
echo openssl s_server -WWW
echo and make sure the 1mb file is in the same directory
echo to make the 1mbrf file do:
echo dd if=/dev/urandom of=1mbrf bs=1024 count=1024
echo
echo the following benchmarks each will have run 50 times
echo
function benchmark {
echo Cipher: $1
openssl ciphers -v $1
time for i in {1..50}
do
echo GET /1mbrf HTTP/1.0 | openssl s_client -quiet -cipher $1 >/dev/null 2>&1
done
}
benchmark AES256-SHA
benchmark AES128-SHA
benchmark DES-CBC3-SHA
benchmark EDH-RSA-DES-CBC-SHA
benchmark RC4-SHA
benchmark SEED-SHA
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment