Removed testing key sizes below 512. Added optional testing of larger keys.

This commit is contained in:
John Shaver 2018-11-30 13:16:56 -08:00
parent 54ccf6fa37
commit e3babcd6a9
2 changed files with 22 additions and 10 deletions

View File

@ -4,6 +4,8 @@ name: default
pipeline: pipeline:
build: build:
image: node image: node
environment:
RASHA_TEST_LARGE_KEYS: 1
commands: commands:
- npm install - npm install --ignore-scripts
- npm test - npm test

24
test.sh
View File

@ -137,20 +137,30 @@ echo ""
echo "" echo ""
echo "Re-running tests with random keys of varying sizes" echo "Re-running tests with random keys of varying sizes"
echo "" echo ""
rndkey 32 # minimum key size
rndkey 64 # commented out sizes below 512, since they are below minimum size on some systems.
rndkey 128 # rndkey 32 # minimum key size
rndkey 256 # rndkey 64
# rndkey 128
# rndkey 256
rndkey 512 rndkey 512
rndkey 768 rndkey 768
rndkey 1024 rndkey 1024
rndkey 2048 # first secure key size rndkey 2048 # first secure key size
#rndkey 3072
#rndkey 4096 # largest reasonable key size if [ ${RASHA_TEST_LARGE_KEYS} ]; then
echo "Pass" rndkey 3072
rndkey 4096 # largest reasonable key size
else
echo "" echo ""
echo "Note:" echo "Note:"
echo "Keys larger than 2048 have been tested and work, but are omitted from automated tests to save time." echo "Keys larger than 2048 have been tested and work, but are omitted from automated tests to save time."
echo "Set RASHA_TEST_LARGE_KEYS=0 to enable testing of keys up to 4096."
fi
echo ""
echo "Pass"
rm fixtures/*.1.* rm fixtures/*.1.*