From c3ab52ed44878541386e56897801d84981d94157 Mon Sep 17 00:00:00 2001 From: Jacob Barthelmeh Date: Wed, 8 Aug 2018 15:34:45 -0600 Subject: [PATCH] key size check on ocsp-stapling2 test --- scripts/ocsp-stapling2.test | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/ocsp-stapling2.test b/scripts/ocsp-stapling2.test index 2076af40a..7fa4b1092 100755 --- a/scripts/ocsp-stapling2.test +++ b/scripts/ocsp-stapling2.test @@ -167,6 +167,18 @@ trap cleanup EXIT INT TERM HUP [ ! -x ./examples/client/client ] && echo -e "\n\nClient doesn't exist" && exit 1 +# check if supported key size is large enough to handle 4096 bit RSA +size=`./examples/client/client -? | grep "Max key"` +size=`echo ${size//[^0-9]/}` +if [ ! -z "$size" ]; then + printf 'check on max key size of %d ...' $size + if [ $size -lt 4096 ]; then + printf '%s\n' "4096 bit RSA keys not supported" + exit 0 + fi + printf 'OK\n' +fi + #get four unique ports # 1: ./examples/server/server -R $ready_file1 -p $resume_port &